UUID v5 Generator

Create a deterministic UUID from a namespace and an exact name using the SHA-1-based UUIDv5 algorithm.

Generate a UUID v5

DNS expects a name such as example.com. The exact text is hashed; no DNS lookup occurs.

Enter a DNS name such as example.com.

Exact input matters. UUIDv5 hashes the exact input bytes. Case, whitespace, trailing slashes, Unicode normalization, URL scheme, and DNS trailing dots can change the result. This tool UTF-8 encodes what you enter without silently trimming or normalizing it.
Advanced options
Generate paired Name and UUID rows, up to 200 nonblank lines.

Result

The result receives keyboard focus after successful single generation.

Keyboard shortcut: Ctrl/Cmd + Enter.

Advertisement

How UUIDv5 is calculated

RFC 9562 supersedes RFC 4122 and retains the compatible UUIDv5 algorithm and well-known namespaces.

  1. Convert the namespace UUID to its 16 network-order bytes.
  2. UTF-8 encode the canonical name and append those bytes to the namespace bytes.
  3. Compute the 160-bit SHA-1 digest.
  4. Retain the leftmost 128 bits, discarding the rightmost 32 bits.
  5. Set the four version bits to 0101 and the two variant bits to 10.
  6. Serialize the 128-bit value in standard UUID form.

Worked RFC 9562 Appendix A.4 test vector

Namespace6ba7b810-9dad-11d1-80b4-00c04fd430c8 (DNS)
Namewww.example.com
SHA-1 digest2ed6657de927468b55e12665a8aea6a22dee3e35
Leftmost 128 bits2ed6657d-e927-468b-55e1-2665a8aea6a2
Overwritten bits45 for version; high bits of 5510, producing 95 for the variant octet.
Discarded 32 bits2dee3e35
Final UUID2ed6657d-e927-568b-95e1-2665a8aea6a2

Practical UUIDv5 guidance

Suitable uses

Stable IDs for canonical URLs, imported records, fixtures, resources shared across services, and migrations where the same source key must reproduce the same identifier.

Unsuitable uses

Secrets, passwords, signatures, authentication tokens, unpredictable IDs, or identifiers whose creation time must be sortable. UUIDv5 names can be guessed and tested.

Namespace design

Use a built-in namespace only when its naming rules fit. For an application-owned domain, generate one namespace UUID, document its meaning and version, and keep it stable.

Canonicalization

Specify case, whitespace, Unicode normalization, URL scheme, ports, trailing slashes, query ordering, and DNS trailing-dot policy before generating IDs. Apply that policy identically in every system.

Collisions

Accidental UUIDv5 collisions are extremely unlikely, but hashes do not prove that two original byte strings were identical. Enforce uniqueness and retain or verify the canonical source key where collisions matter.

Cross-system consistency

Share the namespace UUID, UTF-8 encoding, canonicalization rules, and a test vector. Compare expected UUIDs in automated tests before exchanging production identifiers.

Standards and verification

This implementation follows RFC 9562 Section 5.5 and can be checked against the official Appendix A.4 UUIDv5 test vector. RFC 9562 supersedes RFC 4122 while retaining UUIDv5 compatibility.

Generation occurs locally in browser JavaScript; names and namespace values are not sent to a server by this tool. SHA-1 is required for interoperable UUIDv5 identifiers, but it should not be used for signatures, passwords, authentication, or adversarial security decisions.

Last reviewed: .

UUIDv5 FAQ

Is UUIDv5 random?

No. UUIDv5 is deterministic: it hashes a namespace UUID and name with SHA-1, then sets the version and variant bits.

Will the same namespace and name always produce the same UUIDv5?

Yes, when both systems use the same namespace UUID and exactly the same name bytes. Different case, whitespace, encoding, normalization, URL spelling, or DNS trailing dots can change the result.

Are UUIDv5 names case-sensitive?

Yes. This tool UTF-8 encodes the entered string exactly, so Example.com and example.com produce different byte sequences and normally different UUIDs.

How do I choose or create a custom namespace?

Use a standard namespace when its naming rules fit. For application-owned identifiers, generate and permanently record a UUID for the namespace, then use that same UUID in every system.

Does SHA-1 make UUIDv5 unsafe?

SHA-1 is required for interoperable UUIDv5 identifiers. UUIDv5 is suitable for stable identifiers, but not for signatures, passwords, authentication tokens, or adversarial security decisions.

Can a UUIDv5 be reversed to reveal the name?

Not directly. UUIDv5 stores a truncated, bit-modified hash rather than the original name, although predictable names can still be guessed and checked.

How should UUIDv5 collisions be handled?

Accidental collisions are extremely unlikely but possible. Systems that require absolute uniqueness should enforce a unique constraint, compare the canonical source key on conflict, and use a documented resolution policy.

When should I choose UUID v3, v4, v7, or v8 instead?

Choose v3 only for MD5-based compatibility, v4 for random opaque IDs, v7 for time-ordered IDs, and v8 for a documented application-specific format. Choose v5 for interoperable name-based IDs.

Explore more tools