UUID generator

Generate cryptographically secure RFC 4122 version-4 UUIDs in bulk — entirely in your browser.

Click Generate to create UUIDs.

What a UUID generator does, and how v4 works

A UUID (Universally Unique Identifier), sometimes called a GUID, is a 128-bit label used to identify a record without asking a central server for the next free number. That property is what makes it so useful: two independent services — or two database shards on opposite sides of the world — can each mint an identifier and trust that the two will never clash. This tool produces version 4 UUIDs, the variant defined by RFC 4122 whose bits are almost entirely random.

Of the 128 bits, six are reserved as markers and the other 122 are filled from a cryptographically secure random source. Each result is printed in the canonical 8-4-4-4-12 hexadecimal layout, and you can flip case, hyphens and braces to match whatever your code or config file expects.

Anatomy of a worked example

Take f81d4fae-7dec-41d0-a765-00a0c91e6bf6. Reading the 32 hex digits across the five groups, the 13th digit is the 4 in 41d0 — the version marker — and the 17th digit is the a in a765, one of 8, 9, a or b that flags the RFC 4122 variant. Every other digit is random. That is why no two generated values share a meaningful pattern, and why you cannot infer when or by whom a v4 UUID was created.

Which version should you reach for?

VersionBuilt fromBest for
v1Timestamp + MAC addressOrdered IDs where leaking hardware and time is acceptable
v3 / v5Namespace + hash (MD5 / SHA-1)Deterministic IDs — the same name always maps to the same UUID
v4122 random bitsGeneral-purpose keys, tokens and session IDs (this tool)
v7Unix-ms timestamp + randomnessTime-sortable primary keys that index tightly

The collision question

People worry about generating the same UUID twice. With 122 random bits there are roughly 5.3 × 1036 possibilities. To hit a 50% chance of a single collision you would have to generate about a billion UUIDs per second for 85 years straight. In practice the risk is treated as zero, which is exactly why distributed systems hand out keys without ever checking a registry first.

Privacy note: every identifier on this page is generated on your device with no server and no analytics on the output. It is safe to create keys for a private database, internal API or test fixture here — nothing you generate leaves this browser tab.

Frequently asked questions

Are these UUIDs cryptographically secure?

Yes. Each UUID is built from crypto.getRandomValues() — the browser's cryptographically secure random source — through the native crypto.randomUUID() when available, with an equivalent fallback otherwise. The 122 random bits make every value effectively unguessable and unpredictable.

Is anything I generate sent to a server?

No. Generation happens entirely in your browser. The identifiers are never transmitted, logged or stored anywhere, so it is safe to generate keys for private databases, sessions or API resources here.

What is the chance two UUIDs collide?

Vanishingly small. A v4 UUID has 122 random bits — about 5.3 × 10^36 possibilities. You would need to generate roughly a billion UUIDs every second for 85 years to reach even a 50% chance of a single duplicate, so apps generate them independently without coordination.

Why is there a "4" in every UUID I generate?

The 13th hex digit is fixed to 4 to mark the version, and the 17th digit is always 8, 9, a or b to mark the RFC 4122 variant. Those six bits are reserved, which is why a v4 UUID has 122 random bits rather than the full 128.

Can I generate them in bulk?

Yes. Set any count from 1 to 1000 and every identifier is created in a single pass, then shown one per line so you can copy the whole batch straight into a SQL seed, a fixtures file or a test harness.

Should I use a UUID as a database primary key?

It is a common, robust choice for distributed systems because keys can be generated anywhere without a central counter. The trade-off is that random v4 keys are larger than integers and can fragment B-tree indexes; if insert ordering matters, a time-ordered scheme like UUIDv7 indexes more tightly.