What it does
The UUID Generator creates universally unique identifiers in bulk: v4 (random) or v7 (time-ordered). It can also inspect any UUID to tell you its version and variant and, for v7 and v1, when it was created.
How to use it
- Choose v4 (random) or v7 (time-ordered).
- Set the Count (up to 10,000).
- Choose the format: upper case, no hyphens, braces or quotes for pasting into code.
- Copy or download the list. Regenerate makes a new set.
- To inspect a UUID, paste it into Inspect a UUID.
Example
v4 3f8a2c1e-9b4d-4e7a-8c21-5d6f0a9b3e47
v7 019a0b5c-7d10-7a3e-9f1b-2c4d6e8f0a12
The 4 and 7 after the second hyphen are the version. The first 48 bits of a v7 UUID are a millisecond timestamp, so v7 UUIDs sort in creation order.
v4 or v7?
| v4 | v7 | |
|---|---|---|
| Based on | 122 random bits | Timestamp + 74 random bits |
| Sorts by creation time | No | Yes |
| Good for database keys | Fine | Better: keeps indexes compact |
| Reveals creation time | No | Yes |
Good to know
- UUIDs are 128 bits, written as 32 hex digits in 8-4-4-4-12 groups.
- The Nil UUID (all zeros) is a placeholder meaning "no value".
- GUID is Microsoft's name for the same thing.
FAQ
Can two UUIDs ever be the same? In theory yes, in practice no: you would need to generate billions per second for many years to have a real chance of a v4 collision.
Should I use UUIDs in URLs? They are fine as public IDs. Avoid v7 when the creation time should stay private.