UUID Generator
Random version 4 UUIDs, generated in your browser.
What a UUID looks like
A UUID (universally unique identifier) is a 128-bit number written as 32 hexadecimal digits in five groups, for example 3f2b8c1d-9a47-4e61-b20c-77d418e96a05.
| Group | Example | Meaning |
|---|---|---|
| 1 | 3f2b8c1d | Random |
| 2 | 9a47 | Random |
| 3 | 4e61 | Starts with 4: the version number |
| 4 | b20c | Starts with 8, 9, a, or b: the variant |
| 5 | 77d418e96a05 | Random |
Version 4 means the identifier is random apart from those six fixed bits, leaving 122 random bits. Other versions build the value from a timestamp, a hardware address, or a hash of a name. Version 4 reveals nothing about when or where it was made, which is why it is the common default for database keys, request IDs, and file names.
How the randomness is produced
The bytes come from the Web Crypto API (crypto.getRandomValues) rather than Math.random, so the UUIDs are unpredictable as well as unique. They are generated in your browser and not sent anywhere.
Will two ever collide?
Chance that any two UUIDs in a set are the same UUIDs generated Chance of any collision 1 million about 1 in 1.1 × 10^25 1 billion about 1 in 1.1 × 10^19 1 trillion about 1 in 1.1 × 10^13 1 quadrillion about 1 in 1.1 × 10^7 1 quintillion 9.0%
Even at a trillion UUIDs the chance of a single duplicate is vanishingly small, which is why systems can generate them independently without coordinating.