UUID v5 Generator (RFC 4122, Name-Based)
Controls
Output
Tip: Press Ctrl/Cmd + Enter to regenerate with the same settings.
XXXXXXXX
= time_low XXXX
= time_mid 5XXX
= time_hi_and_version (version = 5)XX XX
= clock_seq (variant in high bits) XXXXXXXXXXXX
= node
Understanding UUID v5
UUID v5 is a deterministic, name-based identifier defined by RFC 4122. It hashes a namespace UUID together with a name using SHA-1, then sets the version (5) and variant bits. The same namespace + name always yields the same 128-bit UUID, which makes v5 ideal for stable keys derived from URLs, domain names, or other strings.
How it works
We concatenate the 16 bytes of the namespace UUID with the UTF-8 bytes of the name, compute SHA-1, and take the first 16 bytes of the digest.
We then set time_hi_and_version
’s high nibble to 5
and apply the RFC 4122 variant (10xx
) in
clock_seq_hi_and_reserved
, yielding xxxxxxxx-xxxx-5xxx-yxxx-xxxxxxxxxxxx
.
Namespaces
Built-ins: DNS (6ba7b810-9dad-11d1-80b4-00c04fd430c8
), URL (6ba7b811-9dad-11d1-80b4-00c04fd430c8
),
OID (6ba7b812-9dad-11d1-80b4-00c04fd430c8
), X.500 DN (6ba7b814-9dad-11d1-80b4-00c04fd430c8
).
You can also provide a custom namespace UUID to define your own identifier space.
v1 vs v5 vs v3 vs v4 (quick guide)
- v1 (time-based): Sorts by time; lightweight and widely compatible; uses clock sequence and node.
- v5: Deterministic (SHA-1); preferred modern choice for name-based IDs.
- v3: Deterministic (MD5); older, still interoperable but uses MD5.
- v4: Random; best when you want unpredictability and no dependence on names.
Note: SHA-1 here is used for identifiers, not cryptographic signatures.