UUID v7 Generator
A preset of UUID Generator
Generate time-ordered UUID v7 identifiers — the version standardised in RFC 9562 for use as database primary keys. Because the timestamp leads the value, sequential inserts stay sequential and your index does not fragment the way random v4 keys cause it to.
- Files never leave your device
- Free, no signup
- No watermarks
- Works offline once loaded
How to uuid generator
- 1
Choose a version
v4 for general random IDs, v7 when the IDs will be database primary keys.
- 2
Set how many
Generate anything from one to a thousand at a time.
- 3
Copy or download
Copy the list to your clipboard or download it as a text file.
Why v7 was standardised as recently as 2024
For years, engineering teams that wanted the collision-resistance of a UUID but the index-friendly ordering of a sequential integer had to build their own non-standard hybrid — commonly prefixing a random UUID with a manually generated timestamp, an approach used in various forms by several well-known distributed-systems companies before any official standard existed for it. RFC 9562 formalised that pattern into an official UUID version specifically so implementations across different languages and databases could produce and recognise the same time-ordered structure without every team independently reinventing a slightly different, incompatible variant of the same idea.
Where the timestamp actually sits in the value
The leading 48 bits of a v7 UUID encode a Unix timestamp in milliseconds, which is what gives the value its sort order — comparing two v7 UUIDs as plain strings correctly reflects which was generated first, since the timestamp portion dominates the comparison. The remaining bits stay filled with cryptographically random data, exactly as in v4, so the value is just as resistant to guessing as a fully random UUID would be; only its ordering behaviour changes, not its unpredictability.
What "index-friendly" means for an actual application
Beyond raw insert speed, a time-ordered primary key has a second practical benefit that matters day to day: rows naturally come back in creation order from a simple `ORDER BY id` query, without needing a separate `created_at` column and an extra index on it just to sort records chronologically. For a table that is frequently queried "most recent first" — an activity log, a queue, an audit trail — a v7 primary key gives that ordering for free as a side effect of the ID itself, rather than as a separate cost to maintain.
Frequently asked questions
What is the difference between UUID v4 and v7?
v4 is entirely random. v7 puts a millisecond timestamp in its leading bits, so IDs generated later sort after earlier ones. Both are equally unguessable in practice; v7 simply also happens to be ordered.
Which should I use for a database primary key?
v7. Random v4 keys scatter inserts across the whole B-tree index, which fragments it and slows writes badly at scale. v7 keys append in order, so inserts stay sequential — this is the reason v7 was standardised in 2024.
Can two UUIDs ever be the same?
Mathematically possible, practically not. A v4 UUID has 122 random bits; you would need to generate about 2.7 × 10^18 of them before a collision becomes likely. For comparison, that is more UUIDs than there are grains of sand on Earth.
Are these generated securely?
Yes. They use `crypto.getRandomValues`, your operating system's cryptographic random source, not `Math.random`. This matters if a UUID is ever used as a capability token — a share link, an unsubscribe URL, a password-reset key.
Are UUID and GUID the same thing?
Yes. GUID is Microsoft's name for the same 128-bit identifier. The only difference you will encounter is formatting: Microsoft tooling often wraps them in braces and uses uppercase, both of which this tool can produce.
You might also need
Password Generator
Create strong random passwords and passphrases
JWT Decoder
Decode and inspect JSON Web Tokens
QR Code Generator
Create QR codes for links, text, WiFi and more
Barcode Generator
Code 128 barcodes as scalable SVG
Color Picker & Converter
HEX, RGB, HSL, CMYK and contrast checking
Invoice Generator
Create and download a professional invoice as a PDF
Resume Builder
Build a clean, ATS-friendly resume and download it as a PDF