UUID Generator
Generate UUID v4 and v7.
About the UUID Generator
Generates UUIDs in bulk, either random version 4 or version 7, which prefixes a millisecond timestamp so the values sort chronologically. v7 is the better default for database primary keys because it avoids the index fragmentation random v4 keys cause. Both use the browser's cryptographic random source and are generated locally.
How to use the UUID Generator
- Choose v4 for pure randomness or v7 for time-ordered values.
- Set how many you need.
- Press Generate, then copy the list.
Frequently asked questions
- What is the difference between UUID v4 and v7?
- v4 is entirely random. v7, defined in RFC 9562, puts a 48-bit Unix millisecond timestamp first and fills the rest with randomness, so generated values sort by creation time.
- Which version should I use for a database primary key?
- v7, in most cases. Random v4 keys scatter inserts across a B-tree index and hurt write performance and locality; v7 keys append in order and behave far better.
- Can two UUIDs collide?
- In practice, no. v4 carries 122 random bits, so collisions are not a risk worth engineering against as long as the random source is sound, which it is here.
- Does a UUID v7 leak information?
- It reveals roughly when it was created, to the millisecond. If creation time is sensitive, use v4.