UUID Generator
Generate UUIDs in your browser — v1, v4, or v7, in bulk, with format options. All generation happens locally; nothing is sent to any server.
Inspect a UUID
Paste any UUID below to decode its version, variant, and — for v1 and v7 — its embedded timestamp.
- Version
- —
- Variant
- —
- Timestamp
- —
- Canonical form
- —
UUID reference
Format
A UUID is 128 bits represented as 32 hex digits split into 5 groups by hyphens:
xxxxxxxx-xxxx-Mxxx-Nxxx-xxxxxxxxxxxx - M — version digit (1–8)
- N — variant bits (8, 9, a, or b for RFC 4122)
- Groups: 8-4-4-4-12 hex characters
Versions
- v1 — Gregorian timestamp + MAC address (simulated here with random node)
- v2 — DCE Security (rarely used)
- v3 — MD5 hash of namespace + name
- v4 — Fully random; most widely used
- v5 — SHA-1 hash of namespace + name
- v6 — Reordered v1 for better DB sorting
- v7 — Unix millisecond timestamp + random; sortable and modern
- v8 — Custom/vendor-defined
Collision probability
For v4, the odds of generating a duplicate UUID are astronomically low. To have a 50% chance of a single collision you would need to generate ~2.7 × 1018 UUIDs. In practice, collisions are not a concern.
v7 is slightly less random (48 bits are reserved for the timestamp) but still provides ~74 random bits — more than enough for any application.
When to use which
- v4 — Default choice. Session tokens, request IDs, entity IDs when ordering doesn't matter.
- v7 — Database primary keys. Timestamp prefix allows index-friendly ordering without a separate
created_atcolumn. - v1 — Legacy systems, log correlation where the timestamp embedded in the ID is useful.
- Nil — Placeholder / zero value in APIs and databases.