Home › UUID Generator
UUID Generator
Create unique identifiers for database rows, files or test data: random version 4 or time-ordered version 7, one or many at a time.
Results
How it works
A UUID is 128 bits written as 32 hexadecimal digits in five groups. Version 4 fills 122 of those bits with cryptographically secure random numbers from your browser. Version 7 puts the current time in milliseconds in the first 48 bits, followed by random bits, so values sort roughly in creation order.
Rules and details
Layout: 8-4-4-4-12 hexadecimal digits = 36 characters with hyphensVersion 4: the 13th digit is 4; the 17th digit is 8, 9, a or bVersion 7: first 48 bits = Unix time in ms; the 13th digit is 7Randomness comes from crypto.getRandomValues
Worked example
A version 4 UUID such as 3f2a9c10-7b5e-4d21-a866-1cd490e30b57 has 36 characters including hyphens; its 13th digit is 4 and its 17th is a. The tool generates fresh random values every time you press the button, so this one is only an illustration.
Frequently asked questions
Can two UUIDs ever collide?
In theory yes, in practice no: with 122 random bits you would need to generate billions of values per second for many years to have a realistic chance of a duplicate.
Which version should I use for a database key?
Version 7 is friendlier to database indexes because new values are larger than old ones, which avoids scattering inserts. Version 4 is fine when order does not matter.
Are these UUIDs safe to use as secrets?
They come from a secure random source but they are identifiers, not authentication tokens. For secrets, use the token generator with a longer length.
Tips
- Remove hyphens when a system stores UUIDs as 32-character strings.
- Use the copy button to take the whole list, one UUID per line.
- Generating 100 at once is handy for test fixtures.