UUID v5 Generator
Pick a namespace and type a name. The same name always gives the same ID. ClickTap Copy to use it.
Enter a full UUID, like 6ba7b810-9dad-11d1-80b4-00c04fd430c8.
- Free, no sign-up
- Follows the official RFC 9562 standard
Make UUID v5s from a list
Paste up to 10,000 names and get one UUID v5 for each, using the namespace above. Three quick steps.
What is a UUID v5?
A UUID v5 is an ID made from a name. Give it the same namespace and name, and you get the same ID every time, on any computer.
Version 5 runs a SHA-1 hash over two things: a namespace UUID and your name. The namespace says what kind of name it is, such as a domain (DNS) or a web address (URL). The hash is cut down to 128 bits and 6 of them are set to mark the version and variant.
Nothing is random and nothing is stored. That makes v5 handy when two systems must agree on an ID without talking to each other, or when you want to turn an existing key, like an email or a URL, into a UUID.
What a UUID v5 looks like
Here is the ID for the name you typed, split into its parts. Change the name and watch it change.
- The 5 means version 5. It is always in this spot.
- This digit is always 8, 9, a or b. It marks the standard layout.
- Everything else is hash bits: 122 bits taken from the SHA-1 hash of the namespace and name. They look random, but they are fixed for that name.
When to use UUID v5
Good for
- Stable IDs for URLs, domains or file paths
- Turning an existing key, like an email, into a UUID
- Two systems that must reach the same ID on their own
- Re-running imports without creating duplicate rows
Make a UUID v5 in code
import { v5 as uuidv5 } from 'uuid';
const id = uuidv5('example.com', uuidv5.DNS);
console.log(id); // cfbff0d1-9375-5685-968c-48ce8b15ae17Uses the uuid package from npm. Browsers and Node.js have no built-in v5.
import uuid
id = uuid.uuid5(uuid.NAMESPACE_DNS, 'example.com')
print(id) # cfbff0d1-9375-5685-968c-48ce8b15ae17The uuid module ships with Python.
import "github.com/google/uuid"
id := uuid.NewSHA1(uuid.NameSpaceDNS, []byte("example.com"))
fmt.Println(id)Uses the widely used google/uuid package. NewSHA1 makes a v5.
use uuid::Uuid;
let id = Uuid::new_v5(&Uuid::NAMESPACE_DNS, b"example.com");
println!("{id}");Uses the uuid crate with the "v5" feature turned on in Cargo.toml.
use Ramsey\Uuid\Uuid;
$id = Uuid::uuid5(Uuid::NAMESPACE_DNS, 'example.com');
echo $id->toString();Uses the ramsey/uuid package from Composer.
CREATE EXTENSION IF NOT EXISTS "uuid-ossp";
SELECT uuid_generate_v5(uuid_ns_dns(), 'example.com');Needs the uuid-ossp extension, which ships with PostgreSQL.
UUID v5 vs other versions
Questions people ask
Will I get the same UUID v5 in every language?
Yes, as long as the namespace and the name bytes match. Watch for small differences like a trailing slash, letter case or extra spaces. "Example.com" and "example.com" give different IDs. Java and .NET have no built-in v5, so use a library there.
Which namespace should I pick?
Use DNS for domain names, URL for full web addresses, OID for ISO object IDs and X.500 for directory names. For your own kinds of names, make one random UUID v4, keep it fixed, and use it as a custom namespace.
SHA-1 is broken. Is UUID v5 still safe to use?
For IDs, yes. The attacks on SHA-1 matter for signatures and passwords, not for naming things. Just do not treat a v5 as a secret: anyone who can guess the name can work out the ID.
Can I get the name back from a UUID v5?
No. The hash only goes one way. But if the name is easy to guess, someone can try names until one matches, so keep private data out of v5 names.
Should I use v5 or v3?
Use v5. The standard prefers it over v3 for new work. Pick UUID v3 only to match IDs that an older system already made with MD5.


