UUID Version 5 Generator (SHA-1 Name-Based)

Generate consistent UUIDs using namespace and name with SHA-1 hashing

Namespace SettingsSHA-1

Version v3 and v5 UUIDs require a namespace and name to generate deterministic UUIDs.

Must be a valid UUID. Use the dropdown to select a predefined namespace.
Any text string that will be hashed to create the UUID.

Try these examples:

What is UUID v5?

UUID version 5 is a namespace-based 128-bit identifier (36-char string) defined in RFC 4122. It combines:

  • Namespace UUID: Pre-defined or custom UUID to scope the generation
  • Name: User-defined string value within the namespace
  • SHA-1 hash: Cryptographic algorithm used to generate the result

Format example: 2ed6657d-e927-5eb1-9a03-0242ac130003

How UUID v5 works

  1. Select a namespace UUID (pre-defined or custom)
  2. Concatenate the namespace UUID and the name string
  3. Compute SHA-1 hash of the concatenated value
  4. Set version bits (0101) and variant bits (10)
  5. Assemble as 32 hex digits with hyphens: 8-4-4-4-12 format

Advantages & Considerations

AdvantagesConsiderations
  • Deterministic (same input = same UUID)
  • Namespaced organization
  • No network or time dependency
  • No privacy concerns (no MAC address)
  • Not time-ordered
  • Same input always creates same UUID
  • Namespace selection impacts uniqueness
  • SHA-1 has known cryptographic weaknesses

UUID v5 Structure

BitsContent
0-47First 48 bits of SHA-1 hash
48-51Version (0101 for v5)
52-63Next 12 bits of SHA-1 hash
64-65Variant (10 for RFC4122)
66-127Remaining 62 bits of SHA-1 hash

UUID v5 vs. other versions

VersionBased onUse casePrivacy
UUID v1Time + MACTime-ordered IDs⚠️ Reveals MAC
UUID v3Namespace + MD5Deterministic IDs✅ Private
UUID v4RandomSecure random IDs✅ Private
UUID v5Namespace + SHA-1Deterministic IDs✅ Private
UUID v6Time (reordered)Sortable IDs⚠️ Reveals MAC
UUID v7Time + randomSortable IDs✅ Private

Predefined Namespaces

NamespaceUUIDPurpose
DNS6ba7b810-9dad-11d1-80b4-00c04fd430c8For domain names
URL6ba7b811-9dad-11d1-80b4-00c04fd430c8For URLs
OID6ba7b812-9dad-11d1-80b4-00c04fd430c8For ISO OIDs
X.500 DN6ba7b814-9dad-11d1-80b4-00c04fd430c8For X.500 Distinguished Names

Common Use Cases

  • Content addressing: Consistent IDs for identical content
  • Distributed systems: Named resources across systems
  • URL mapping: Converting URLs to stable identifiers
  • Configuration management: Tracking named configuration items
  • Data deduplication: Identifying identical records
  • Federation: Consistent cross-system identifiers

Frequently Asked Questions

Is UUID v5 better than UUID v3?

Yes, for most use cases. UUID v5 uses SHA-1 which is cryptographically stronger than the MD5 algorithm used in UUID v3. However, both provide deterministic generation.

Can UUID v5 values collide?

Collisions are theoretically possible but extremely unlikely in practice due to the properties of SHA-1. Using different namespaces or name strings virtually eliminates collision risk.

Is SHA-1 secure enough for UUID v5?

For UUID purposes, SHA-1 remains suitable despite its cryptographic weaknesses. UUID v5 is not intended for security purposes but for generating consistent identifiers.

Can I create my own namespace for UUID v5?

Yes. While RFC 4122 defines standard namespaces (DNS, URL, OID, X.500), you can create custom namespaces using any valid UUID, typically a v4 random UUID.

Will the same name always generate the same UUID v5?

Yes, but only within the same namespace. The same name in different namespaces will generate different UUIDs, which is a key feature for organizing identifiers.

Resources