← All tools Dev Tools

UUID/GUID Generator

Generate RFC 4122-compliant UUIDs in bulk with one click. Everything runs locally — your data never leaves the browser.

5
150100

What Is a UUID and Why Does It Matter?

A UUID (Universally Unique Identifier) is a 128-bit value used to identify information across distributed systems without coordination between parties. Defined by RFC 4122, UUIDs are written as 32 hexadecimal digits in five groups separated by hyphens: 8-4-4-4-12.

UUID version 4, generated by this tool, uses cryptographically secure random numbers for 122 of its 128 bits. The remaining 6 bits encode the version (4) and variant, ensuring the identifier conforms to the standard format.

UUID Versions Compared

v1 — Timestamp + MAC

Combines the current timestamp with the node's MAC address. Guarantees uniqueness but leaks network identity and creation time.

v4 — Random

Uses 122 bits of cryptographically secure randomness. The most widely used version due to simplicity, privacy, and near-zero collision probability.

v5 — SHA-1 Name-based

Derives a deterministic UUID from a namespace and a name using SHA-1 hashing. Always produces the same UUID for the same input, useful for consistent ID generation.

v7 — Unix Timestamp + Random (new)

A newer format that embeds a Unix millisecond timestamp in the most significant bits, making UUIDs sortable by creation time while retaining randomness for uniqueness.

UUIDs as Database Primary Keys

Using UUIDs as primary keys is a popular pattern in distributed databases and microservice architectures. Each service can independently generate IDs without coordinating with a central authority, avoiding bottlenecks and single points of failure.

Performance note

Random UUIDs (v4) can fragment B-tree indexes because inserts occur at random positions. If sequential index performance matters, consider UUID v7 which sorts chronologically, or use ULID as an alternative.

UUID vs GUID vs ULID

UUID and GUID are functionally identical — GUID is simply Microsoft's name for the same concept. ULID (Universally Unique Lexicographically Sortable Identifier) is a more recent alternative that encodes a timestamp in the first 48 bits, making identifiers sortable by creation time while remaining compatible with UUID storage fields.

Frequently Asked Questions

What is a UUID?

A UUID (Universally Unique Identifier) is a 128-bit identifier standardized by RFC 4122. It is designed to be unique across space and time without requiring a central authority, making it ideal for distributed systems, database keys, and session identifiers.

What is the difference between UUID and GUID?

UUID and GUID refer to the same concept. UUID is the standard term defined in RFC 4122, while GUID (Globally Unique Identifier) is the term used by Microsoft. They produce functionally identical 128-bit identifiers.

How unique is a UUID v4?

With 122 random bits, UUID v4 offers about 5.3 x 10^36 possible values. You would need to generate roughly 2.71 quintillion UUIDs before reaching a 50% probability of a single collision. For all practical purposes, each UUID is unique.

When should I use UUIDs as database primary keys?

UUIDs work well as primary keys in distributed systems, when merging data from multiple sources, or when you want to hide sequential record counts. The trade-off is larger storage (16 bytes vs 4-8 for integers) and potential B-tree index fragmentation with random UUIDs.

Is this UUID generator secure for production use?

Yes. This tool uses the Web Crypto API (crypto.randomUUID) which provides cryptographically secure random number generation. All processing runs locally in your browser — no data is transmitted to any server.

Related Tools