What it does
A UUID (universally unique identifier) is a 128-bit value written as 32 hexadecimal digits, for example 550e8400-e29b-41d4-a716-446655440000. Applications use them as database keys, request IDs and file names without needing a central authority to hand out numbers.
Which version?
- v4 is almost entirely random (122 random bits). It is the most widely supported choice.
- v7 starts with a millisecond timestamp followed by random bits. New UUIDs sort roughly by creation time, which keeps database indexes efficient. UUIDs generated in one batch here are strictly increasing.
- Nil is all zeros, sometimes used as an "empty" placeholder.
More identifier types
- v1 and v6 hold a 100-nanosecond clock. This tool uses a random node value with the multicast bit set, so it can never be a real network card address. UUIDs in one batch are strictly increasing.
- v3 (MD5) and v5 (SHA-1) are hashes of a namespace and a name, one name per line. The same namespace and name always give the same UUID. The hashes are used for identity here, not for security.
- ULID is 26 characters: a millisecond time followed by random bits. IDs in one batch sort ascending, even inside the same millisecond.
- NanoID uses rejection sampling so every character of your alphabet is equally likely. The alphabet must not repeat a character.
- KSUID is 27 characters: a 4-byte time in seconds (counted from 13 May 2014, UTC) followed by 16 random bytes.
Validate a UUID
The validator accepts the usual 8-4-4-4-12 form, 32 digits without hyphens, {braces} and the urn:uuid: prefix, in any case. It checks structure only: it cannot tell whether a UUID is in use. A v3 or v5 UUID does not reveal its name. A v1 UUID with a real hardware address in the node field can identify the machine that made it. A ULID or KSUID pasted by mistake is recognised and its time is shown.
Limits
Up to 1000 identifiers at a time and 200 lines to validate. CUID2 is not offered.
Good to know
Random values come from crypto.getRandomValues, the same source browsers use for cryptography.
Examples you can check
- v7 batch. Three UUIDs generated together start with the same timestamp prefix and increase one by one, for example
…aa81…,…aa82…,…aa83…. The first 48 bits are the Unix time in milliseconds, the 7 after the second hyphen group shows the version, and the rest is random, so v7 values sort by creation time. - Name-based UUIDs are repeatable. UUID v5 of the name
example.comin the DNS namespace is alwayscfbff0d1-9375-5685-968c-48ce8b15ae17, and the v3 version, which uses MD5, is always9073926b-929f-31c2-abc9-fad77ae3e8eb. These values match the ones produced by Python’s uuid module. - Nil UUID.
00000000-0000-0000-0000-000000000000, all zeros, sometimes used as an empty placeholder.
The section below the generator adds the formats that are not plain random: UUID v1, v3, v5 and v6, and the shorter ULID, NanoID and KSUID. v4 and v7 values use your browser’s secure random number generator.
Frequently asked questions
Will two UUIDs ever collide?
With 122 random bits in v4, the chance is so small that it is ignored in practice. v7 has fewer random bits per millisecond, but values in one batch here are strictly increasing, so they cannot repeat.
Which version should I use as a database key?
v7 is a good choice, because new values are close together and keep database indexes efficient. v4 is the most widely supported.
Can I use a UUID as a secret or a password?
No. A UUID is an identifier. Anyone who sees it can use it, and the version rules fix some of its bits, so use a proper random token for secrets.
Are the UUIDs sent anywhere?
No. They are created in your browser.
Privacy
This tool runs entirely in your browser. What you enter is processed on your device and is not sent to a server.