UUID v3 is a name-based UUID that hashes a namespace and a name using MD5. Like UUID v5, it is deterministic, so identical inputs always produce the same identifier. Most new projects should choose UUID v5 instead, but v3 remains useful for compatibility with systems that already use it.
Key takeaways
- Deterministic name-based UUID, computed with MD5.
- Behaves like UUID v5 but uses the older MD5 hash.
- Prefer UUID v5 for new work; use v3 for existing v3 data.
When to use UUID v3
UUID v3 exists mainly for compatibility. If another system already generates v3 identifiers from a namespace and name, you need v3 to reproduce the same values. The algorithm is identical to UUID v5 except that it hashes with MD5 rather than SHA-1.
For brand-new systems that just need deterministic name-based UUIDs, UUID v5 is the better default because SHA-1 is a stronger hash function.
How UUID v3 is built
The generator concatenates the 16 bytes of the namespace UUID with the UTF-8 bytes of the name, hashes the result with MD5, keeps the first 16 bytes, then sets the version nibble to 3 and the RFC variant bits. The output is a standard UUID that any parser will accept.
bytes = md5( namespaceBytes + utf8(name) )
uuid = bytes[0..15] with version=3 and RFC variantNamespaces work the same way
As with UUID v5, you can use the DNS, URL, OID or X.500 namespaces, or provide your own custom namespace UUID. The same namespace and name always produce the same v3 UUID.