Benchvale

UUID generator

Choose version 4 for a random identifier or version 7 when keys should sort roughly by creation time. Both follow RFC 9562 and are drawn in this tab. Paste one back to see its variant and RFC section. An RFC 9562 variant also names the version and, for version 7, the embedded millisecond timestamp in UTC and local time.

Generate


        

Inspect a UUID

Measured from this batch
Version
·
Generated
·
Variant
·
Network requests
·
Our own script
·

Was this tool useful?

The UUIDs you generate never leave your browser: this page doesn't send them to us or anywhere else. Once the page has loaded, you can disconnect and keep working. How we build tools
Requests: · listed · unlisted Script · Updated

Version 4 and version 7 solve different jobs

A version 4 UUID looks like 128 bits of randomness and is not. Four bits are the version field, which is why the first character of the third group is always 4, and two more are the variant field, which is why the first character of the fourth group is always 8, 9, a or b. What is left is 122 random bits.

Version 7 replaces the first 48 bits with the Unix timestamp in milliseconds. The remaining 74 unfixed bits are random. Newly generated identifiers sort roughly by creation time, which improves index locality without exposing a machine address. Values created in the same millisecond are randomly ordered; this generator does not claim strict monotonic ordering.

Paste one back

Inspect a UUID decodes one you paste. Paste a UUID, including one this page just made, and the page names the variant nibble and the RFC 9562 section. For an RFC 9562 variant it also names the version, and for version 7 the timestamp in UTC and in this browser's local zone. The bit view shows 32 nibble cells with the variant (17th) marked, and the version (13th) marked whenever a version is named. A well-formed UUID with a reserved variant is named as such, not decoded as a version.

Two special values, and a version 7 timestamp

Paste 00000000-0000-0000-0000-000000000000. The page reports the Nil UUID from RFC 9562 §5.9: its variant bits are 00, and the standard defines it as a special value, not a malformed UUID. Paste ffffffff-ffff-ffff-ffff-ffffffffffff and you get the Max UUID from §5.10, variant bits 11, also a special value. The version row reads Version 0 (nil) and Version 15 (max), so each is flagged as the special value rather than decoded as an ordinary UUID. A tool that decodes either one as an ordinary versioned UUID is not following RFC 9562.

Then generate one version 7 and paste it into the same field. The first 48 bits are a Unix millisecond timestamp. The panel prints that instant in UTC and in this browser's local zone. IDs made in the same millisecond, which includes every ID in one batch, are in random order relative to each other.

What this page will not generate

Only versions 4 and 7 are on the menu. Version 1 embeds a MAC address, which this page will not put in an identifier. Versions 3 and 5 are name-based: they hash a namespace and a name, which is a different job from drawing a random identifier. Version 2 is reserved for DCE security.

This page does not generate ULIDs or NanoIDs, which are different identifier formats. UUIDs are identifiers, not secrets. Version 7 includes a creation time by design. If you want a secret, use the password generator, which is built for values nobody can guess.

Every UUID is drawn from crypto.getRandomValues, never from a non-cryptographic pseudo-random source.

Questions

What's the difference between UUID v4 and v7?

Version 4 is random: 122 random bits plus 6 fixed ones. Version 7 starts with a 48-bit Unix timestamp in milliseconds, then 74 random bits. So new v7 IDs sort roughly by creation time, which RFC 9562 notes helps database indexes. Both are 128 bits and print as 36 characters with hyphens.

Are UUIDs unique?

Not guaranteed, just very unlikely to repeat. A version 4 UUID has 2^122 possible values, about 5.3 × 10^36. You'd need around 2.7 × 10^18 of them before the chance of one duplicate reaches 50 percent. Every UUID here comes from crypto.getRandomValues, the browser's secure random source.

How can I tell if a UUID is v7?

Look at the first character of the third group. It's the version, so 7 means version 7 and 4 means version 4. Or paste it into Inspect a UUID. The panel names the version and variant, and for a v7 it prints the embedded time in UTC and in your local time zone.

Is UUID v7 ordered?

Roughly. IDs from different milliseconds sort in time order, because the timestamp comes first. IDs that share a millisecond are in random order, and every ID in one batch here shares one. There's no counter to force strict order inside a batch. While the page is open, the timestamp won't go backward if your clock steps back between batches.

Is a UUID the same as a GUID?

Yes. RFC 9562 defines UUIDs as "also known as GUIDs," so it's the same 128-bit identifier under two names. Wrap in braces gives you the {...} form, and Uppercase gives capitals. The value is the same either way.

Are these generated on a server?

No. They're generated in this tab, so they appear instantly and the count can go to 1,000 with no rate limit. Nothing is recorded. Keep in mind that a UUID is an identifier, not a secret. For something that must stay unguessable, use the password generator.

Related tools

For a secret rather than an identifier, the password generator draws from the same random source and prints the entropy. To fingerprint a value rather than invent one, use the hash generator. And the JSON formatter is next door for the payload these identifiers usually end up in.

Maintained by Aaron Wilson
Published . Last updated . How the tools work and how we check them: how we build tools. Something wrong? Tell us.