Skip to main content

UUID Version 5 Generator

UUIDv5 • SHA-1 Hashed Namespace & Name
00000000-0000-0000-0000-000000000000
Enclose:

Generate Bulk UUIDs

Max 5,000
Formatting & Structure

Ready

No batch active
Deterministic Name-BasedRFC 9562 Section 5.5 / RFC 4122

UUID Version 5 Technical Specification (SHA-1 Namespace)

UUIDv5 generates deterministic, reproducible 128-bit identifiers by hashing a namespace UUID and a name string using the SHA-1 cryptographic digest. Given the identical namespace and input string, UUIDv5 always outputs the exact same identifier.

Bitfield Layout & Binary Structure

Detailed 128-bit byte distribution according to RFC standards.

Field NameBit RangePurpose & Description
sha1_hash[0..47]48 bits (0-47)First 48 bits of the SHA-1 hash output.
ver4 bits (48-51)Constant binary value 0101 (identifies Version 5).
sha1_hash[52..63]12 bits (52-63)Bits 52 to 63 of the SHA-1 hash output.
var2 bits (64-65)Constant binary value 10 (RFC standard variant).
sha1_hash[66..127]62 bits (66-127)Bits 66 to 127 of the SHA-1 hash output.

Advantages & Strengths

  • Deterministic & Idempotent: same inputs guarantee the exact same UUID across any system or language.
  • Zero storage coordination needed: remote services can generate matching IDs without network calls.
  • Far more collision-resistant than MD5-based UUIDv3.
!

Considerations & Trade-offs

  • Cannot be reversed or decoded back to the original string.
  • SHA-1 is deprecated for digital signatures, though still safe for non-cryptographic unique identification.

Best Recommended For

  • Consistent entity identification (e.g. converting user emails, domain names, or external IDs to UUIDs).
  • Idempotent API operations and deduplication pipelines.

When to Avoid

  • Random token generation or security session keys.

Code Implementation Examples

Python Standard LibraryPython
import uuid

# DNS Namespace
id = uuid.uuid5(uuid.NAMESPACE_DNS, 'bulkuuidgenerator.com')
print(id)

Frequently Asked Questions

What standard namespaces are available for UUIDv5?
RFC 9562 defines standard pre-allocated namespaces: DNS (6ba7b810-9dad-11d1-80b4-00c04fd430c8), URL (6ba7b811-9dad-11d1-80b4-00c04fd430c8), OID (6ba7b812-9dad-11d1-80b4-00c04fd430c8), and X.500 (6ba7b814-9dad-11d1-80b4-00c04fd430c8).
Is UUIDv5 superior to UUIDv3?
Yes. UUIDv5 uses SHA-1 (160-bit digest), which provides far stronger hash distribution and collision resistance than the older MD5 hash (128-bit) used by UUIDv3.