Text and data

Generate a UUID

One identifier or a thousand, from the same random source your browser uses for TLS. The interesting part is not the generating — it is choosing the version, so that is explained rather than listed.

On this device

Choose a version

Version 4 is the right answer unless you know otherwise. Each version below says what it is for.

Version 4 unless you know otherwise. Version 7 if these become database keys.

122 random bits. It reveals nothing about when or where it was made.

Up to 1000. A batch of version 7 identifiers is counted as it is generated, so it comes out in order.

FormatStandard
Format

Conventions about writing, not about content. A GUID in braces is the same 128 bits.

What this tool does, exactly

Version 4 — the default
122 random bits and nothing else. Unguessable, carrying no information about when or where it was made, and the right choice for almost everything. If you have no particular reason to choose another, this is the one.
Version 7 — when they are database keys
A millisecond timestamp followed by randomness, so the identifiers sort in the order they were created. That matters more than it sounds: random keys scatter inserts across a B-tree index and fragment it, while time-ordered ones append. If these UUIDs are becoming primary keys in a database, this is the one to use.
Version 5 — when the same input must give the same id
A SHA-1 hash of a namespace and a name, so “the same URL” always produces the same UUID, on any machine, forever. Useful for deriving stable identifiers from something that already identifies the thing. It is deterministic, which also means it is not secret: anyone with the namespace and the name can compute it.
Version 1 — legacy, and it leaks
Timestamp plus a node identifier historically derived from a network card's MAC address. It is here because systems still require it, and it comes with a warning: a v1 UUID can reveal when it was created and something about the machine that created it. Nothing new should use it — v7 gives you the time ordering without the disclosure.
Where the randomness comes from
The browser's cryptographic random source, the same one that seeds TLS, through crypto.randomUUID and crypto.getRandomValues. Not Math.random, which is fast, predictable from its own output, and completely unsuitable for anything that must be unguessable.

About this tool

Which version should I use?

Version 4 unless you have a specific reason otherwise — it is random, unguessable and carries no information. Choose version 7 if these identifiers will be primary keys in a database, because time-ordered keys keep the index tidy while random ones fragment it. Choose version 5 only when the same input must always produce the same identifier. Choose version 1 only when something you cannot change insists on it.

Is a UUID and a GUID the same thing?

Yes. GUID is Microsoft's name for the same 128-bit identifier, and the two words are interchangeable. The only thing that ever differs is the formatting convention — braces around it, or uppercase letters — which is why both are offered here as output formats rather than as different kinds of identifier.

Can two UUIDs ever collide?

In principle yes, in practice no, for version 4. With 122 random bits you would need to generate about a billion a second for roughly 85 years to reach a 50% chance of a single collision. Version 5 is different by design: identical inputs always produce identical output, which is the point rather than a flaw.

Are these generated on a server?

No, and it matters more here than it looks. An identifier generated on somebody else's machine is an identifier they have seen, which is a poor start for anything that is meant to be unguessable — a password-reset token, an invitation link, an unlisted resource. These come from your own browser's cryptographic source, and nothing is transmitted.

Is version 7 safe to use yet?

Yes. It was standardised in RFC 9562 in May 2024, and it is supported by current versions of PostgreSQL, MySQL and every major language's UUID library. The time ordering is its whole reason to exist, and it is worth noting it also means a v7 identifier reveals roughly when it was created — which is fine for a database key and wrong for anything that should be opaque.

More text and data tools · All 25 · How they work