UUID
UUID Generator
Generate random version 4 UUIDs.
About UUIDs
A UUID (Universally Unique Identifier) is a 128-bit value, almost always shown as 32 hex digits in five dashed groups. A version 4 UUID is generated from random bits, so two independently generated UUIDs are, in practice, never the same.
Version 4, generated here, is only one of several UUID versions in active use. Version 1 encodes the generating machine's MAC address and a timestamp — useful for ordering, but it leaks information a random ID doesn't. Versions 3 and 5 are deterministic hashes of a namespace and a name, so the same inputs always produce the same UUID, which is useful for content-addressed identifiers. The newer version 7 packs a millisecond timestamp into the leading bits specifically so UUIDs sort chronologically, something version 4's pure randomness can never do.
Where you'll run into it
- Primary keys for database rows that don't need to be sequential
- Idempotency keys for API requests
- Unique identifiers for sessions, requests, or distributed-system events
- Anonymous identifiers that don't leak creation order, unlike auto-increment IDs
Frequently asked
Can two generated UUIDs ever collide?
In theory yes, in practice no — version 4 UUIDs have 122 random bits, so the odds of a collision are negligible even across billions of IDs.
Are UUIDs sortable by creation time?
Not version 4. If you need IDs that sort by time, look at time-ordered alternatives like UUIDv7 or ULIDs.
Is there anything secret encoded in a UUID?
No, a v4 UUID is just random bits — it doesn't encode the server, user, or time that generated it.
Why not just use UUIDv1 or the newer UUIDv7 instead?
Different versions trade off different properties. UUIDv4, which this tool generates, is pure randomness with no ordering and no embedded information — the right choice when you specifically don't want an ID to reveal when or where it was created. UUIDv1 embeds a timestamp and MAC address; UUIDv7 embeds only a timestamp, giving IDs that sort by creation time, which databases index far more efficiently than random v4 values. Pick v7 if insertion-order performance matters and leaking creation time is fine.