Free online UUID generator
UUID generator that never touches Math.random
This UUID generator is free and needs no signup: pick version 4, version 1, version 7 or the NIL constant, set a count anywhere from 1 to 10,000, and the batch appears immediately as a plain list, a JSON array, CSV or a ready-to-run SQL INSERT. Every value comes from the browser’s cryptographic random source — crypto.randomUUID() where it exists and crypto.getRandomValues() otherwise — and if neither is available the page refuses to generate rather than quietly substituting Math.random(). Paste an existing identifier into the decoder and it reports the version, the variant and, for the time-based versions, the moment it was created.
- 100% free
- No signup
- Up to 10,000 at once
- v1 · v4 · v7 · NIL
- Web Crypto only
Randomness from the Web Crypto API, never Math.random().
Paste one anywhere on this page. Braces, a urn:uuid: prefix, missing hyphens and uppercase are all accepted.
The version, variant and — for v1, v6 and v7 — the moment it was created will appear here.
How to generate a UUID
Pick a version, take a batch, and decode one on the way back.
Choose a version and a batch size
v4 is the default and the right answer unless you have a reason otherwise; v7 puts a millisecond timestamp in the leading bits so the values sort by creation time, v1 uses the 1582 Gregorian clock with a random node, and NIL is the all-zero constant. Set the count to anything from 1 to 10,000, or hit one of the six presets, and the batch regenerates the moment either changes.
Shape the identifiers
Switch the output between a plain list, a JSON array, a CSV column and a multi-row SQL INSERT, then tick Uppercase or untick Hyphens if the system you are feeding wants the 32-character form. Wrap adds Microsoft-style braces or the RFC 9562 urn:uuid: prefix without you having to re-run the batch — the formatting is applied to the values already generated.
Copy, download, or read one back
Copy puts the whole batch on the clipboard and Download saves it as .txt, .json, .csv or .sql named after the version. To go the other way, paste a UUID anywhere on this page: it lands in the decoder, which reports the version, the variant, and for v1, v6 and v7 the exact moment the identifier was created.
Technical specifications
| Versions generated | 4 (random), 1 (100-nanosecond Gregorian clock plus a random node), 7 (Unix milliseconds, sortable) and the NIL constant 00000000-0000-0000-0000-000000000000 |
|---|---|
| Randomness source | crypto.randomUUID() where the browser exposes it, otherwise crypto.getRandomValues(); if neither exists the page generates nothing rather than using Math.random() |
| Batch size | 1 to 10,000 per run — 10,000 version 4 values are generated in under 15 ms and come to 361 KB as a plain list |
| Output formats | Plain list, JSON array of strings, CSV with a uuid header row, and a single multi-row SQL INSERT statement |
| Formatting options | Lower or upper case, hyphenated (36 characters) or bare (32), optionally wrapped in braces or prefixed urn:uuid: |
| Decoder | Reports version and variant for all eight versions plus NIL and Max, and decodes the embedded timestamp of v1, v6 and v7 to the 100-nanosecond tick |
| Collision resistance | 122 random bits per v4, so a 50% chance of any collision needs about 2.7 × 10^18 identifiers — 86,000 years at a million per second |
| Processing location | Your browser — the identifiers are created in your own tab and no batch is ever transmitted or logged |
Frequently asked questions
Can two v4 UUIDs collide?
In theory yes, in practice no. A version 4 UUID carries 122 random bits — six of the 128 are spent marking the version and the variant — which is about 5.3 × 10^36 possible values. By the birthday bound you would need roughly 2.7 × 10^18 of them before there was a 50% chance that any two matched, and at a million UUIDs per second that takes about 86,000 years. The realistic failure is never the arithmetic, it is a weak random source, which is why this page uses the Web Crypto API and stops rather than falling back to Math.random().
Should I use v7 as a database key?
Usually yes, if you were going to use a UUID for the key at all. Version 7 leads with a 48-bit Unix millisecond timestamp, so new rows land at the right-hand edge of a B-tree index instead of scattering across every page of it — the random insertion pattern of a v4 primary key is what fragments pages, inflates write amplification and pushes the index out of cache. Two caveats: a v7 publishes its creation time to the millisecond, and a monotonic key concentrates writes on one page, which matters once you shard.
Is a UUID secret?
No — treat it as an identifier, never as a credential. A v4 is unguessable enough to act as an unlisted URL, but it travels in Referer headers, browser history, proxy logs and analytics pipelines, and nothing in the format resists enumeration if any part of it turns out to be predictable. Versions 1, 6 and 7 are weaker still, because their timestamp is readable by anyone who pastes the value into the decoder above.
What is the difference between a UUID and a GUID?
Nothing meaningful — GUID is Microsoft's name for the same 128-bit value. The one real trap is byte order: Microsoft's binary GUID struct stores the first three fields little-endian, so the same identifier written to a Windows GUID and to an RFC 9562 byte array produces two different byte sequences even though the text forms are identical. Microsoft tooling also wraps the text in braces, which the Wrap control adds for you.
How many random bits does a v4 UUID actually have?
122, not 128. Four bits are pinned to 0100 to mark version 4 and two more to 10 to mark the RFC 9562 variant, which is why the 13th hexadecimal digit of every v4 is 4 and the 17th is 8, 9, a or b. Those six bits are exactly what lets a parser tell one version from another, so reducing a UUID to 32 arbitrary hex digits quietly produces something that is no longer a UUID.
Why is crypto.randomUUID() sometimes undefined?
Because it is only exposed in a secure context — HTTPS, or localhost. Open the same page over plain http:// from a LAN address and crypto.randomUUID() disappears along with crypto.subtle, while crypto.getRandomValues() stays available; that is the fallback this generator uses, and the status line under the output names whichever one produced your batch. If neither exists the page generates nothing and says so, because Math.random() is a fast non-cryptographic PRNG whose internal state can be reconstructed from a short run of outputs.
Does a v1 UUID leak my MAC address?
It can, and historically it did — the author of the 1999 Melissa virus was identified partly through GUIDs that Word had embedded in documents. RFC 9562 still permits a real MAC address in the 48-bit node field, but it also permits a random node with the multicast bit set, and that is what this page emits: a browser cannot read your MAC anyway, and a fresh random node is drawn for every batch. The decoder tells you which kind you are holding — if the first byte of the node is odd, the multicast bit is set and the node is random.
About UUIDs and their versions
A UUID is 128 bits with six of them spoken for: four mark the version and two mark the variant, leaving 122 for whatever the version puts there. Those six are the reason the 13th hexadecimal digit tells you at a glance what you are looking at, and the reason every RFC-conformant identifier has 8, 9, a or b as its 17th. The governing document is now RFC 9562, published in May 2024, which retired RFC 4122 after nineteen years and added three formats to the original five: version 6, a version 1 with its timestamp fields reordered so that byte order matches time order; version 7, built on plain Unix milliseconds; and version 8, a deliberately empty slot for custom layouts. The same document finally blessed the Max UUID of all ones as a companion to NIL.
The reason anyone cares about v7 is index locality. A version 4 primary key arrives at a random point in the key space, so every insert lands on a different B-tree page; on a large table that means the working set of pages never fits in memory, page splits multiply, and a clustered index — InnoDB’s default, and the shape SQL Server usually takes — physically reshuffles rows to keep them in key order. Version 7 puts a 48-bit millisecond timestamp in front, so consecutive inserts land next to each other and the index grows at one edge, the same access pattern an auto-increment key gives you while keeping the property that clients can mint keys offline. The trade is disclosure: those 48 bits are readable by anyone, and you can confirm it by pasting a v7 into the decoder above or by dropping the millisecond value into the epoch converter.
Version 1 is the oldest layout and the one with a reputation. Its last 48 bits are a node identifier that the original specification suggested filling with the machine’s MAC address, which turned a supposedly opaque identifier into a fingerprint of the computer that made it. RFC 9562 keeps that option but explicitly allows a random node with the multicast bit set instead, and that is what this page produces — no browser can read a MAC address, and pretending otherwise would be worse. Two v1 values made in the same millisecond stay distinct through the 100-nanosecond digits and a per-batch clock sequence, which is the mechanism the format uses in place of a counter. If you are in the habit of pulling identifiers apart to see what a system is telling you, the JWT decoder does the same job for the other opaque string in every request header.
Where these identifiers are made
In your own browser, by the Web Crypto API built into it. No batch is uploaded, logged or retained anywhere, and the page holds nothing after you close the tab — which also means a UUID you generate here has never existed outside your machine, and nobody else could have received the same one.