Turn a name into a stable UUID v5 by hashing it with a namespace using SHA-1. Use the DNS, URL, OID or X.500 namespace or your own; same name, same ID. UUID v5 is the recommended name-based version, handy for deriving IDs from emails, URLs or other natural keys.
UUID version 5 generates an identifier from data you already have. It takes a namespace UUID and a name, hashes them with SHA-1, and keeps 122 bits of the hash. The same namespace and name always produce the same UUID, on any machine and in any programming language. This makes v5 useful when two systems need to agree on an ID without talking to each other, for example when importing the same records twice or when mapping URLs, email addresses or product codes to UUID primary keys.
uuid5.txt with the buttons in the corner.Tip: for your own application, create one fixed namespace with the random button next to Namespace UUID, save it, and reuse it for every name.
| Namespace | Name | UUID v5 |
|---|---|---|
| DNS | www.example.com | 2ed6657d-e927-568b-95e1-2665a8aea6a2 |
| DNS | python.org | 886313e1-3b8a-5372-9b90-0c9aee199e5d |
| URL | https://example.com/ | dd2c1780-811a-5296-81c5-178a0ef488bc |
These match common libraries, for example uuid.uuid5(uuid.NAMESPACE_DNS, 'python.org') in Python or v5('python.org', v5.DNS) in the JavaScript uuid package. The third block always starts with 5.
Use v5 unless you must match existing v3 values. Both work the same way, but v5 uses SHA-1 instead of MD5, and RFC 9562 prefers it.
Not directly, because hashing is one-way. However, if the names are easy to guess (such as email addresses), someone can hash candidates and compare, so do not treat a v5 UUID as a way to hide data.
Not for normal use. Known SHA-1 attacks involve deliberately crafted collisions; they do not affect using v5 to create consistent identifiers.
No. The UUID is computed locally in your browser.