UUID Generator
Generate v4 and time-ordered v7 UUIDs using cryptographic randomness.
Press Generate.
Features
- Version 4 (random) and version 7 (time-ordered)
- Bulk generation up to 1,000 at once
- Five output formats including URN and brace notation
- Cryptographically secure randomness via the Web Crypto API
- Field-by-field breakdown of the generated value
How to use it
- Choose a version, v4 unless you need sortability.
- Set how many you need.
- Press Generate.
- Copy the list or download it as a text file.
Choosing between v4 and v7
A version 4 UUID is 122 random bits with six bits reserved for version and variant markers. That gives about 5.3 × 10³⁶ possible values, which is enough that collisions are not a practical concern, you would need to generate roughly a billion per second for 85 years to reach a 50% chance of a single collision. This tool draws from crypto.getRandomValues(), not Math.random(), which matters: Math.random() is not cryptographically secure and its output can be predicted from previous values.
Version 7 was standardised in RFC 9562 in 2024 and solves a real database problem. Because v4 UUIDs are entirely random, inserting them as a primary key scatters writes across the whole B-tree index, which fragments pages and slows inserts badly at scale. A v7 UUID puts a 48-bit millisecond timestamp in the high bits, so newly generated values sort after older ones and inserts land at the end of the index. If you are choosing a primary key type today, v7 is usually the better default.
Two things v7 gives up. It leaks the creation time of the record, which may matter if the identifier is exposed publicly. And it is only sortable to millisecond precision, values generated within the same millisecond order randomly among themselves, so it is not a substitute for a real sequence when strict ordering matters.
Frequently asked questions
Related tools
Further reading
Read the full guide on the 123MiniApps blog.