Free UUID v4 generator
Generate random version-4 UUIDs (RFC 4122 / RFC 9562) — cryptographically random 128-bit identifiers in the standard 36-character format — right in your browser, as many as 50 at a time, with a fresh batch on every click.
On this page13 sections
Output is generated client-side in your browser. No data is transmitted to any server.
Results are estimates. Consult a professional.
What this UUID generator does
This UUID generator creates random UUIDs — universally unique identifiers — in your browser, one click at a time. Set how many you want (1 to 50), and the tool produces that many fresh IDs in the standard 36-character form, ready to copy into your code, database or config. Hit Regenerate for a brand-new batch. Each one is a version 4 UUID: 128 bits with 122 of them drawn at random, the kind almost every system reaches for when it needs an identifier that nothing else will ever share.
A UUID lets two computers that have never spoken pick an ID for the same thing — a row, a request, a file — and be confident they will not collide. There is no central counter handing out numbers, no "next ID" to ask a server for. Each machine generates its own, and the maths makes a clash so unlikely it is treated as impossible. That is why UUIDs power distributed databases, message queues, and APIs the world over.
UUID format: the 8-4-4-4-12 structure
Every UUID is a 128-bit number, written as 32 hexadecimal digits split into five groups by hyphens: 8-4-4-4-12. That comes to 36 characters in all — 32 hex digits plus 4 hyphens. The hex is lowercase by convention, and two specific positions are not random at all: they encode the version and the variant, which tell any reader how the UUID was made.
A worked example: reading a v4 UUID
Because v4 is random, this generator never produces the same UUID twice, so we cannot pin a fixed output the way an arithmetic calculator can. Instead, here is a sample valid v4 UUID — the same shape every result takes — annotated group by group.
The five groups
Split on the hyphens: 3f2504e0 · 4f89 · 41d3 · 9a0c · 0305e82c3301. That is 8 + 4 + 4 + 4 + 12 = 32 hex digits, 36 characters with the hyphens — exactly the form above.
The version nibble (M)
The third group is 41d3, and its first digit is 4. That marks this as a version 4 (random) UUID. If you ever see a 1 there it is time-based, a 7 means time-ordered, and so on.
The variant nibble (N)
The fourth group is 9a0c, and its first digit is 9 — one of 8, 9, a or b. That marks the RFC 4122 variant, the layout used by virtually every UUID you will meet. Every other x in the string is a random hex digit.
UUID versions: v1, v4, v5 and v7 compared
The version nibble names how a UUID was generated, and the choices have real trade-offs. Version 4 is the everyday default — pure randomness, no inputs, nothing leaked — and it is what this generator produces. The others exist for specific needs: embedding a timestamp, deriving an ID from a name, or getting database-friendly ordering.
| Version | How it's made | Sortable? | Best for |
|---|---|---|---|
| v1 | Timestamp + node (MAC address) + clock sequence | Roughly, by time | Legacy systems; leaks time and hardware address |
| v4 | 122 random bits from a CSPRNG | No | General-purpose IDs, unguessable tokens-of-identity — the common choice |
| v5 | SHA-1 hash of a namespace + a name | No | Deterministic IDs: same name always yields the same UUID |
| v7 | Unix-millisecond timestamp + random bits | Yes, by creation time | Database primary keys; time-ordered and index-friendly |
Versions per RFC 4122 (v1, v4, v5) and RFC 9562 (which adds the time-ordered v7). v2 and v3 exist but are rare in practice; v3 is the MD5 sibling of the SHA-1-based v5.
Why UUID collisions are astronomically unlikely
A version-4 UUID has 122 random bits, which is 2¹²² possible values — about 5.3 × 10³⁶, or 5.3 undecillion. That space is so vast that two independently generated v4 UUIDs colliding is, for any realistic workload, something you can safely ignore.
The honest way to think about it is the birthday problem: how many UUIDs would you have to generate before there is even a 50% chance of a single collision? The answer is roughly 2.7 × 10¹⁸ — about 2.7 billion billion. To put that in perspective, generating a billion v4 UUIDs every second, it would take about 85 years just to reach that fifty-fifty mark. Stay well under it — say 103 trillion UUIDs — and the chance of even a single duplicate is around one in a billion.
What developers use UUIDs for
UUIDs show up wherever something needs an identifier that can be generated anywhere, by anyone, without coordination. A few patterns cover most real uses.
- Database primary keys. Generate the ID in your application before the row is inserted, so you never have to round-trip to the database for an auto-increment value — handy across shards and replicas. (For high-write tables, see the v7 note below on index locality.)
- Distributed and offline IDs. Mobile apps, multiple services and offline clients can each mint IDs independently and merge them later with no clashes — there is no central sequence to bottleneck on.
- Idempotency keys. Attach a UUID to an API request so the server can recognise a retry and avoid charging a card or creating an order twice.
- Correlation and trace IDs. Tag a request with a UUID and follow it through logs across every service it touches.
- File and object names. Name uploads or temp files with a UUID to avoid overwrites and to keep names unguessable.
UUID gotchas and common mistakes
UUIDs are simple to use and easy to misuse. Three mistakes account for most of the trouble.
- Do not treat a UUID as a security token. Uniqueness is not secrecy. UUIDs are designed to be shared — they sit in URLs, logs and emails — and a v1 UUID even reveals the time and MAC address of the machine that made it. For anything that grants access, use a purpose-built secret from a password generator, not a UUID.
- v4 is not sortable. Because the bits are random, sorting v4 UUIDs gives a meaningless order, and using them as a clustered key scatters inserts across the index. If you need creation order, reach for v7.
- Mind the format. UUIDs are case-insensitive and the hyphens are presentation, not data —
3F2504E0-4F89-41D3-9A0C-0305E82C3301and the 32 hex digits with no dashes represent the same value. Normalise to one form (lowercase, hyphenated) before comparing or storing as a string, or store the 16 raw bytes.
Is this UUID generator safe to use?
Yes. Every UUID is generated locally in your browser with the Web Crypto API (crypto.randomUUID()). Nothing is sent to a server, logged, or stored — there is no network request, because the randomness comes from your own device. The values you see are yours alone, and the page works the same offline.
Generating them client-side also means the randomness is cryptographic, not the predictable kind a fast pseudo-random generator would give — important, since the whole uniqueness guarantee rests on a good random source. For other client-side identifiers and secrets, see the password generator, and for hashing inputs into fixed-length digests, the hash generator.
UUID generator definitions
Frequently asked questions about the free UUID v4 generator
About this UUID generator
This UUID generator runs entirely in your browser. Each identifier is a version-4 UUID built locally with the Web Crypto API (crypto.randomUUID) — 128 bits with 122 of them cryptographically random — so nothing is sent to a server, logged, or stored, and the tool works the same offline. Set how many you need (1 to 50) and hit Regenerate for a fresh batch.
Looking for more developer utilities? Browse the rest of our dev tools, or see the full library on the all calculators page.