How to use it
A UUID generator produces identifiers that are unique across systems without any central counter. This one creates version 4 (random) UUIDs, from 1 to 100 per run with 5 as the default, using your browser's cryptographic generator: crypto.randomUUID where available, or an equivalent built on crypto.getRandomValues. Nothing is sent to our server. Use the values as database keys, test data, file names or request IDs.
Using the UUID generator
- Enter how many UUIDs you need in Count, from 1 to 100.
- Press Run tool.
- Copy the list, one UUID per line, with Copy output, or save it as a text file with Download output.
Anatomy of a version 4 UUID
A UUID is a 128-bit number written as 32 hexadecimal digits split by hyphens into groups of 8, 4, 4, 4 and 12, for example 7c9e6679-7425-40de-944b-e07fc1f90ae7. With hyphens it is 36 characters long. In version 4 only six bits are fixed. The first digit of the third group is always 4, marking the version, and the first digit of the fourth group is 8, 9, a or b, marking the variant. The remaining 122 bits are random.
Because the version digit sits in a fixed place, you can recognize a v4 UUID at a glance: look at the first character after the second hyphen.
How likely is a collision, really?
122 random bits give about 5.3 × 10³⁶ possible values. The right way to think about duplicates is the birthday problem: the question is not whether one particular UUID repeats, but whether any two in your whole collection match. For n UUIDs, the chance of at least one collision is roughly n² ÷ (2 × 2¹²²).
| UUIDs generated | Chance of at least one duplicate |
|---|---|
| 1 billion (10⁹) | About 1 in 10 quintillion |
| 1 trillion (10¹²) | About 1 in 10 trillion |
| 103 trillion | About 1 in a billion |
| 2.7 × 10¹⁸ | About 50 percent, which means a billion UUIDs per second for roughly 86 years |
In practice the danger lies not in the maths but in the random source. A weak generator, or one seeded identically on cloned virtual machines, can repeat values long before these numbers come into play, and code built on Math.random is the classic culprit. This tool relies on the browser's cryptographic generator, so that risk does not apply.
Version 4 or version 7?
RFC 9562, published in 2024, updated the UUID standard and added time-ordered versions. Version 7 starts with a millisecond Unix timestamp, so UUIDs created one after another sort in creation order. That suits primary keys in databases with B-tree indexes: new rows land at the end of the index instead of at random positions, which keeps inserts efficient on large tables. Version 4 is fully random, reveals nothing about when it was created and cannot be predicted from earlier values. This tool generates version 4 only. Consider v7 for very high-volume tables, and stick with v4 for identifiers that should not leak timing information.
Where UUIDs earn their keep
- Primary keys in systems where several servers or offline clients create records without coordinating.
- Collision-free names for user uploads and generated files.
- Request or correlation IDs that tie together log lines across services.
- Placeholder IDs for fixtures, sample JSON and unit tests; the JSON formatter helps tidy the data around them.
- Public identifiers in URLs where sequential numbers would reveal how many records or customers you have.
Things to keep in mind
- A UUID is not a secret: v4 values are hard to guess, but the standard advises against treating UUIDs as security tokens. Use purpose-built random secrets for session tokens or password-reset links, and the password generator when you need a password.
- Letter case: the standard says hex digits should be output in lower case and accepted in either case on input, so normalize both sides before comparing strings.
- Storage: a native UUID column or a 16-byte binary field is smaller and indexes better than a 36-character text column.
Privacy
UUIDs are generated entirely in your browser. In a secure context the tool calls crypto.randomUUID; elsewhere it builds standards-compliant values from crypto.getRandomValues. Generated values are not sent to our server or stored, and the page only increments an anonymous usage counter. For background on the format and its history, read what is a UUID.