UUID v7 Generator
Generate time-sortable v7 UUIDs in bulk — the embedded timestamp decoded live, entirely on this device.
Decoded timestamp
- Timestamp
- —
- Unix ms
- —
Press ? for shortcuts
Do it offline:$ npx uuid v7
How to use it
- Set a count from 1 to 100,000 and press Regenerate — a worker handles batches above 10,000.
- Read the annotation strip under the output: the leading 48 bits decoded to a UTC instant.
- Copy values singly or in bulk, or download .txt, .csv or .json in any notation.
UUID v7 leads with a 48-bit Unix millisecond timestamp, so values sort by creation time as plain strings. Generate 1 to 100,000 here — big batches run in a background worker — and the first value's embedded timestamp is decoded under the output. Nothing leaves your browser.
How it works
The layout: 48 bits of Unix milliseconds, the version nibble 7, then 74 random bits from crypto.getRandomValues, variant pinned to 10. Time in the most significant bits makes byte order creation order.
Within one millisecond, RFC 9562's monotonic-counter method applies: sequence bits advance instead of re-rolling, so same-tick values still come out strictly ascending.
Examples
019f9925-8200-7c3a-9f4e-6d2a8b1c5e77first 48 bits = 019f99258200 → 2026-07-25T12:00:00.000ZParse the leading 12 hex digits as a number: that is the Unix millisecond timestamp — the decode shown under every value here.
count = 3 · Download → .csvuuid
019fcc63-525a-719c-8730-74845d5486d1
019fcc63-525b-7077-823b-10ae8b000275
019fcc63-525b-7077-823b-1578ef6991b8One captured burst, already ascending — the last two rows share a millisecond yet still sort. Random batches are verified by version, variant and order.
Every example on this page is executed against the same engine that powers the tool, on every build.
Gotchas worth knowing
Same-millisecond bursts stay ordered
Sorting a copy of a fresh batch changes nothing: same-tick values already differ in their sequence bits, which keeps B-tree inserts appending instead of scattering.
Common errors
100,000 is the browser-side cap — need more? script it: `npx uuid v7`- The refusal names a real escape hatch: the same uuid package this page uses, scripted.
Count must be a whole number between 1 and 100,000.- The count field blocks bad values as you type; this guards restored links and edited URLs.
FAQ
Why pick v7 over v4 for database keys?
Random v4 keys scatter inserts across an index; v7 keys append — fewer page splits, warmer caches, identical uniqueness math. If creation time must stay unreadable, that is v4's job.
What actually makes a v7 UUID sortable?
Its most significant 48 bits are the timestamp, so string or byte comparison is creation-time comparison — no parsing, no extra ordering column.
Do systems built for v4 accept v7 values?
Usually: length, alphabet and variant match; only the version nibble differs. Check any validator that hard-pins the digit 4 before switching.