Developer Tools
UUID Generator
Generate one or many random version-4 UUIDs using your browser's secure random source. Copy them all with one click — great for database keys, test data and APIs.
How to generate UUIDs
- Enter how many you need in the How many box, from 1 to 500. The field starts at 5; anything above 500 is cut back to 500, blanks and decimals are rounded down, and nonsense becomes 1.
- Click Generate UUIDs. The list appears instantly in a read-only box, labelled with the count and '(v4)'.
- Scroll the box if you asked for more than 12, since it shows at most twelve lines at a time.
- Click Copy all to put the whole list on the clipboard, one UUID per line, with no commas or quotes. The button reads 'Copied!' for a second and a half.
How each identifier is produced
Every line comes from a single call to crypto.randomUUID(), a function built into the browser. It pulls 128 bits from the operating system's cryptographic random source, overwrites 6 of them with the fixed version and variant markers required by RFC 4122, and formats the remaining 122 random bits as lowercase hexadecimal. The browser does the formatting, so for most visitors no custom code touches the random bits.
crypto.randomUUID only exists in secure contexts (an https page, which this is) and in browsers released from 2021 onwards: Chrome 92, Firefox 95 and Safari 15.4. Where it is missing, the page falls back to crypto.getRandomValues: it fills 16 random bytes, sets the version nibble to 4 and the variant bits to 10, then writes the same 8-4-4-4-12 pattern itself. Only if neither function exists does the button show an error instead of a list.
Anatomy of a version-4 UUID
Take 3f2504e0-4f89-4a1e-9b2c-0305e82c3301 as an example. It is 36 characters long: 32 hex digits in five groups separated by four hyphens, in the 8-4-4-4-12 pattern that RFC 4122 specifies.
The group names in the table come from the time-based version 1 layout; a version 4 UUID keeps the field boundaries but fills them with random data. A quick validity check on any UUID this tool prints: the 15th hex digit is 4 and the 17th is one of 8, 9, a or b.
| Group | Example | Hex digits | What it holds in a v4 UUID |
|---|---|---|---|
| 1 (time_low) | 3f2504e0 | 8 | 32 random bits |
| 2 (time_mid) | 4f89 | 4 | 16 random bits |
| 3 (time_hi_and_version) | 4a1e | 4 | First digit is always 4 (the version), then 12 random bits |
| 4 (clock_seq) | 9b2c | 4 | First digit is 8, 9, a or b (the variant bits 10), then 14 random bits |
| 5 (node) | 0305e82c3301 | 12 | 48 random bits |
How unlikely a duplicate is
With 122 random bits there are 2^122, about 5.3 × 10^36, possible values. By the birthday calculation you would need to generate roughly 2.7 × 10^18 UUIDs before the chance of a single duplicate reaches 50%. At one billion UUIDs the probability of any collision is about 9 × 10^-20. Generating 500 at a time with this page, you could click for the rest of your life without approaching those numbers. Uniqueness therefore rests entirely on the quality of the random source, which is why the browser's cryptographic generator, not Math.random, is used.
Versions and formats this page does not offer
- Only version 4. There is no version 1 (timestamp plus MAC address), version 5 (SHA-1 of a name) or version 7 (time-ordered) option.
- Lowercase with hyphens only. No uppercase, no braces, no 32-character form without hyphens; apply those with a find-and-replace after copying.
- A maximum of 500 per click. For 5,000 rows of test data, click ten times and paste each batch.
- No nil UUID (all zeros) and no validation of UUIDs you paste in.
- Random v4 values do not sort by creation time, so as database primary keys at large scale they scatter inserts across an index; version 7 was designed to fix that.
Typical jobs for a batch of UUIDs
- Primary keys for rows created in a client or a spreadsheet before they reach the database.
- Idempotency keys sent with payment or email API requests so a retry is not processed twice.
- Correlation IDs that follow one request through logs across several services.
- File names for uploads, so two users uploading photo.jpg never overwrite each other.
- Fixture data for tests, where 50 distinct IDs are needed in one paste.
Frequently asked questions
What is a version-4 UUID?
A version-4 UUID is a 128-bit identifier generated from random numbers, written as 32 hex digits in five groups. The odds of two colliding are vanishingly small, so they're widely used as unique IDs.
Are these UUIDs secure and unique?
They're produced with the browser's cryptographically secure random generator (crypto.randomUUID, or crypto.getRandomValues on older browsers), making them suitable as unique keys for databases, APIs and test data.
Why does the third block always start with a 4?
That digit is the version number. RFC 4122 reserves the first four bits of the third group for it, so every random UUID shows a 4 there, and the fourth group starts with 8, 9, a or b for the same reason.
Can I generate more than 500 UUIDs at once?
Not in one click; the field is clamped to 500. Generate repeatedly and paste each batch, which takes a few seconds for several thousand.
Is a UUID the same thing as a GUID?
Yes. GUID is Microsoft's name for the same 128-bit identifier. .NET prints GUIDs in lowercase with hyphens by default, so the values from this page can be pasted straight in.
Can I get uppercase UUIDs or ones without hyphens?
Not from the tool itself. Copy the list, then change case or remove hyphens in your editor; the identifier stays valid in either form because the hex digits are what matter.
Explore
113 tools. Zero uploads. One place.
Every tool opens instantly, works on your phone and keeps your files on your device.
UUID Generator guides
Related tools
JSON Formatter
Developer Tools
Format, validate and minify JSON instantly.
Open toolBase64 Encode / Decode
Developer Tools
Encode text to Base64 or decode it back.
Open toolURL Encode / Decode
Developer Tools
Percent-encode or decode URLs and query strings.
Open toolColor Converter
Developer Tools
Convert colors between HEX, RGB and HSL.
Open tool