UUID Namespace
UUID v5 X.500 Namespace
The X.500 namespace is for distinguished names — the LDAP-style identity strings used in directories and certificates.
Well-known RFC namespace6ba7b814…Deterministic (SHA-1)
Generated locally with the Web Crypto API — nothing leaves your browser.
What Is UUID v5 X.500 Namespace?
- The X.500 namespace is
6ba7b814-9dad-11d1-80b4-00c04fd430c8. It exists so a distinguished name likecn=John Doe,dc=example,dc=comcan be mapped into the UUID space. - Distinguished names are how LDAP directories and X.509 certificates identify entities, which makes this the natural namespace for directory-linked data.
How to generate
- Select version v5 and the x500 namespace.
- Paste the distinguished name in LDAP order.
- Generate — the same DN always hashes to the same UUID.
Use Cases
- Directory synchronisation between LDAP and an application database.
- Certificate-linked records keyed by subject DN.
- Stable user keys derived from an existing corporate directory.
Code Examples
Python
import uuid
uid = uuid.uuid5(uuid.NAMESPACE_X500, 'cn=John Doe,dc=example,dc=com')JavaScript
import { v5 as uuidv5 } from 'uuid';
const id = uuidv5('cn=John Doe,dc=example,dc=com', '6ba7b814-9dad-11d1-80b4-00c04fd430c8');Frequently Asked Questions
Is the DN case-sensitive here?
The hash is byte-exact, so normalise case and attribute order first — otherwise
CN= and cn= produce different UUIDs.Which namespace for email addresses?
The RFC reserved no email namespace. Many projects define their own namespace UUID for that, so the mapping stays stable within their system.