The Version Library
A complete reference of all UUID versions defined in RFC 4122 and RFC 9562.
Version 4: Pure Randomness
StandardThe workhorse of the web. Generated using 122 bits of cryptographically strong pseudo-random numbers (CSPRNG).
👍 Pros
Simple to implement. High privacy (no data leakage). No coordination required. Collisions are statistically impossible (< 1 in 10^36).
👎 Cons
Not sortable (Unordered). Causes "Page Splitting" and Index Fragmentation in B-Tree databases.
Version 7: Unix Epoch Time
RecommendedThe new gold standard for databases (RFC 9562). Combines a 48-bit Unix timestamp (milliseconds) with 74 random bits. Sortable and unique.
👍 Pros
Sortable (Monotonic). Database Index Friendly (Sequential inserts). High Entropy. No MAC address required.
👎 Cons
Reveals creation time (to the millisecond).
Version 6: Reordered Time
TransitionalA field-compatible update to v1. Reorders timestamp bytes so "High" time comes first for sorting.
👍 Pros
Sortable by creation time. Compatible with v1 fields.
👎 Cons
Superseded by v7. Still uses MAC address (privacy).
Version 8: Custom Vendor
SpecializedA standardized bucket for "non-standard" implementations. Allows embedding custom data while valid.
👍 Pros
Maximum flexibility. Valid UUID format.
👎 Cons
No interoperability guarantees.
Version 1: Gregorian Time & MAC
LegacyVersion 1 concatenates a 60-bit timestamp (100ns intervals since 1582) with the generating node's 48-bit MAC address.
👍 Pros
Guaranteed unique per machine. Roughly time-ordered.
👎 Cons
Privacy Nightmare: Encodes the creator's MAC address. Relies on stable system clock. Middle-endian timestamp makes sorting hard.
Version 3: MD5 Name-Based
LegacyGenerated by hashing a "Namespace UUID" and a "Name" string using MD5. Deterministic: same input = same UUID.
👍 Pros
Deterministic. Good for mapping external IDs to UUIDs.
👎 Cons
MD5 is cryptographically broken (collision attacks exist). Slower than random.
Version 5: SHA-1 Name-Based
StandardIdentical to v3 but uses SHA-1 hashing. The preferred method for deterministic UUIDs.
👍 Pros
Stronger hash than MD5. Deterministic mapping.
👎 Cons
Slower than v4. SHA-1 is theoretically weak (but fine for uniqueness).
Version 2: DCE Security
ObsoleteReplaces low timestamp with POSIX UID/GID. Defined in DCE 1.1.
👍 Pros
Includes POSIX user identity.
👎 Cons
Limited randomness. Violates opacity. Not in original RFC 4122.