Generating identifiers
The tool generates every layout anyone makes in practice (v1, v3, v4, v5, v6, v7 and v8), plus a ULID and the two constants. For the ones that carry a clock you can pick the moment; for the name-based ones you pick a namespace and a name.
Converting is only half of what the tool does. This page covers the other half: which generator to reach for, what each one puts in the bits, and the two options that only some of them take.
cfbff0d1-9375-5685-968c-48ce8b15ae17outuuid · RFC 9562 (10xx) · version 5v5 of the DNS namespace and example.com
9073926b-929f-31c2-abc9-fad77ae3e8eboutuuid · RFC 9562 (10xx) · version 3v3 of the same pair
00000000-0000-0000-0000-000000000000outuuid · NCS (0xxx) — reserved, backward compatibility · no version · nil, palindromeNil
ffffffff-ffff-ffff-ffff-ffffffffffffoutuuid · reserved for the future (111x) · no version · max, palindromeMax
On this page (8)
What each generator gives you#
| Type | Made of | Takes a moment | Takes a name |
|---|---|---|---|
| v4 | 122 random bits | no | no |
| v7 | 48 bits of Unix ms, then randomness | yes | no |
| v1 | a 1582 clock and a node | yes | no |
| v6 | the v1 clock, reordered to sort | yes | no |
| v3 | MD5 of a namespace and a name | no | yes |
| v5 | SHA-1 of a namespace and a name | no | yes |
| v8 | free bits, filled at random here | no | no |
| ULID | the v7 clock in Crockford base32 | yes | no |
| Nil, Max | all zeros, all ones | no | no |
Version 2 is missing from that list on purpose: DCE Security identifiers need a POSIX user or group id, almost no library makes them, and the layout page covers what they contain if you have been handed one.
RFC 9562 § 5 · UUID LayoutsEvery layout the generators above follow
Aiming the clock#
v1, v6, v7 and ULID carry a timestamp, so the generator lets you set it. Leave the field empty and it uses now; type a date and you get an identifier that claims that moment. The field has no timezone, so the browser reads it as local time, which is what somebody typing 2024-05-03 01:09 into it means.
That is useful for fixtures, for reproducing a bug that only shows up around a boundary, and for testing a range query without waiting for the clock. It is not a way to backdate anything real: the identifier says what it was told to say.
Name-based generation, in one line#
Pick a namespace, type a name, and the identifier appears. The same pair always gives the same value, on any machine and in any language, which is what makes v5 the tool for identifiers that have to be derived rather than issued.
RFC 9562 § 6.5 · Name-Based UUID GenerationWhat the derivation does with the namespace and the name
The three that are jokes with a point#
deadbeef, cafebabe and palindrome are in the list because a recognisable identifier is genuinely useful in a fixture: nobody mistakes deadbeef-dead-beef-dead-beefdeadbeef for production data, and a palindrome makes a byte-order bug visible at a glance, since reversing it changes nothing.
Which to pick#
- A database key: v7.
- An identifier and nothing else: v4.
- The same input must always give the same identifier: v5.
- You are matching an older system: v1, v6 or v3, whichever it already writes.
- A placeholder or a range bound: Nil and Max.
Questions people actually ask#
Can I generate a UUID for a specific date?
Yes, for the versions that carry a clock: v1, v6, v7 and ULID. Set the moment and the timestamp field is filled from it.
Which version does the generator make by default?
v4, the random one, which is what most systems expect when nothing else is specified.
Are the generated identifiers sent anywhere?
No. They are made in this page by the same code the converter runs, and nothing leaves the tab.
Related#
Browse the reference
Start here
Making and converting in bulk
Converting a UUID
Reading one
The versions, in order
In a database
ULID and the alternatives
Running the tool