What a UUID generator does, and how v4 works
A UUID (Universally Unique Identifier), sometimes called a GUID, is a 128-bit label used to identify a record without asking a central server for the next free number. That property is what makes it so useful: two independent services — or two database shards on opposite sides of the world — can each mint an identifier and trust that the two will never clash. This tool produces version 4 UUIDs, the variant defined by RFC 4122 whose bits are almost entirely random.
Of the 128 bits, six are reserved as markers and the other 122 are filled from a
cryptographically secure random source. Each result is printed in the canonical
8-4-4-4-12 hexadecimal layout, and you can flip case, hyphens and braces to match
whatever your code or config file expects.
Anatomy of a worked example
Take f81d4fae-7dec-41d0-a765-00a0c91e6bf6. Reading the 32 hex digits across the
five groups, the 13th digit is the 4 in 41d0 — the
version marker — and the 17th digit is the a in
a765, one of 8, 9, a or b that
flags the RFC 4122 variant. Every other digit is random. That is why no two
generated values share a meaningful pattern, and why you cannot infer when or by whom a v4 UUID
was created.
Which version should you reach for?
| Version | Built from | Best for |
|---|---|---|
| v1 | Timestamp + MAC address | Ordered IDs where leaking hardware and time is acceptable |
| v3 / v5 | Namespace + hash (MD5 / SHA-1) | Deterministic IDs — the same name always maps to the same UUID |
| v4 | 122 random bits | General-purpose keys, tokens and session IDs (this tool) |
| v7 | Unix-ms timestamp + randomness | Time-sortable primary keys that index tightly |
The collision question
People worry about generating the same UUID twice. With 122 random bits there are roughly 5.3 × 1036 possibilities. To hit a 50% chance of a single collision you would have to generate about a billion UUIDs per second for 85 years straight. In practice the risk is treated as zero, which is exactly why distributed systems hand out keys without ever checking a registry first.