UUID Generator
Generate UUID v4 (random) identifiers — one or in bulk.
Did this tool work for you?
How to use this calculator
- 1
Set how many UUIDs to generate; the tool returns between 1 and 100.
- 2
Choose the format: standard, no hyphens, UPPERCASE or braces.
- 3
Run the calculation; a fresh set of version 4 values is generated every time.
- 4
Copy the list straight away, because nothing is stored and the next run replaces it.
Frequently asked questions
Where does the randomness come from?
The 16 random bytes for each UUID come from the browser’s Web Crypto API (crypto.getRandomValues), a cryptographically secure source. If that API were unavailable the code falls back to Math.random, which is not suitable for secrets, but all current mainstream browsers provide Web Crypto.
Which UUID version is this, and what does that mean?
Version 4, the random kind. Of the 128 bits, 6 are fixed (4 for the version and 2 for the variant) and 122 are random. You can see the version as the first character of the third group, always 4, and the variant as the first character of the fourth group, always 8, 9, a or b.
Can two generated UUIDs collide?
In principle yes, in practice no. With 122 random bits you would need to generate roughly 2.7 quintillion (2.7 × 10^18) UUIDs to reach a 50% chance of a single duplicate. Duplicates in real systems nearly always come from copying an ID, not from bad luck.
Is there a limit on how many I can generate?
Yes, 100 per run. A request for 500 returns 100, and anything below 1 or non-numeric returns 1. The Count row shows how many were produced. Every change to the options generates a fresh set, and nothing is stored, so copy the list before adjusting settings.
What are the four formats for?
Standard is the lowercase 8-4-4-4-12 form that the specifications say to output. No hyphens gives 32 hex digits for compact keys or file names. UPPERCASE and braces match the style many Windows and .NET tools use for GUIDs. They are the same value written differently, and parsers should treat letter case as irrelevant.
Should I use UUID v4 as a database primary key?
It works, but random values insert at random positions in an index, which can slow writes on very large tables compared with sequential keys. RFC 9562, published in 2024, defines version 7, whose leading bits are a timestamp so new IDs sort in creation order. This tool only generates v4.
Can I use a UUID as a secret or access token?
Treat it as an identifier. A v4 UUID from a secure generator is hard to guess, but it has a fixed, publicly known layout and only 122 random bits, and IDs often end up in logs and URLs. For passwords, session or API tokens use a purpose-built random token generator.
UUID v4: structure, formats and limits
Anatomy of a version 4 UUID
A UUID is 128 bits written as 32 hexadecimal digits in five groups, 8-4-4-4-12. In version 4 nearly everything is random, apart from two markers the generator sets explicitly on every value: the version digit and the variant bits. That leaves 122 random bits. Because the values are random, each run differs and no fixed output can be quoted; the layout below, taken from one run, is constant.
| Group | Sample | Meaning |
|---|---|---|
| 1 (8 digits) | 37e4d40f | Random |
| 2 (4 digits) | 342b | Random |
| 3 (4 digits) | 4aa6 | First digit is always 4 (version) |
| 4 (4 digits) | 88cc | First digit is 8, 9, a or b (variant) |
| 5 (12 digits) | db83f5b0a36a | Random |
Randomness source and checks
The code reads 16 bytes from crypto.getRandomValues and falls back to Math.random only if that function does not exist. We exercised both paths. With Web Crypto present, 100 values in each of the four formats all matched the pattern for a version 4 UUID, and none repeated within a batch. With Web Crypto removed, the fallback still produced correctly shaped values, but Math.random is not a secure source, so that path should not be relied on for secrets. Across 5,000 values the variant digit was 8 in 1,225, 9 in 1,253, a in 1,261 and b in 1,261, which is the even split expected.
The four output formats
The same value from the layout above, rendered each way: standard 37e4d40f-342b-4aa6-88cc-db83f5b0a36a; no hyphens 37e4d40f342b4aa688ccdb83f5b0a36a; uppercase 37E4D40F-342B-4AA6-88CC-DB83F5B0A36A; and in braces {37e4d40f-342b-4aa6-88cc-db83f5b0a36a}. Choose by what the receiving system expects. A database column of type uuid normally accepts the hyphenated form, while no-hyphen output suits file names and keys where dashes are awkward.
How the count is handled
The count is read as a whole number and forced into the range 1 to 100, with no way to exceed it in a single run. The box is read from the start of the text, so 1e2 is read as 1; type 100 in full for a full batch.
| Entered | Returned | Reason |
|---|---|---|
| 0, empty or text | 1 | Not a positive number |
| -5 | 1 | Raised to the minimum |
| 7.9 | 7 | Decimals are truncated |
| 500 | 100 | Capped at the maximum |
Standards and scope
UUIDs were first specified in RFC 4122, which RFC 9562 replaced in 2024. The newer document keeps version 4 unchanged and adds versions 6, 7 and 8. This tool outputs version 4 only. It does not store anything and does not check new values against earlier ones, so uniqueness rests on the 122 random bits and not on any lookup. Results come back one per line, ready for a spreadsheet column or a fixtures file; add quotes yourself where the target language needs strings.
Learn more from an authoritative source:
MDN Web DocsUnix Timestamp Converter
Convert Unix timestamps to human-readable dates and times, and vice versa.
JWT Decoder
Decode and inspect JWT (JSON Web Token) headers and payloads without verifying the signature.
Cron Expression Generator
Generate and explain cron expressions — pick a preset or write your own.
Slug Generator
Convert any title or phrase into a clean URL slug — lowercase, hyphenated, SEO-friendly.
DNS Lookup
Look up any DNS record type (A, AAAA, MX, NS, CNAME, TXT, SOA) for any domain — powered by Cloudflare DNS.
MX Lookup
Check the mail exchange (MX) records for any domain to see which mail servers receive email for it.
Results are estimates for informational purposes only and do not constitute professional financial, medical, legal, or technical advice. Read full disclaimer →