How to generate UUID v7
- Choose how many IDs you need and the format you prefer.
- Press Generate. IDs created together share a millisecond timestamp prefix and a counter, so the list is strictly increasing.
- Paste any v7 UUID into Inspect to read back the exact time it was created.
Why UUID v7 is the new default for keys
UUID version 7 was standardised in RFC 9562 in 2024. Its first 48 bits are a Unix timestamp in milliseconds, followed by random bits. Because new IDs always sort after older ones, inserting them into a B-tree index appends to the end instead of scattering writes across the whole index, as random v4 UUIDs do. The result is faster inserts, smaller indexes and better cache use in PostgreSQL, MySQL, SQL Server and SQLite.
You keep the benefits of UUIDs (no central sequence, IDs can be generated by clients and merged across systems) while getting roughly chronological ordering for free, which also makes logs and debugging easier.
The trade-off is that a v7 ID reveals when it was created. For public tokens where that matters, use random v4 values instead. These IDs are generated with the browser's secure random generator, entirely on your device.
FAQ
Is UUID v7 supported by databases?
Any database that stores UUIDs can store v7, since it is a normal 128-bit UUID. PostgreSQL 18 adds a native uuidv7() function, and libraries exist for most languages.
What is the difference between UUID v7 and ULID?
Both are time-ordered with a 48-bit millisecond timestamp. ULID uses a 26-character Base32 text form, while UUID v7 uses the standard UUID format, so it fits existing uuid columns.
Are v7 UUIDs guessable?
The timestamp part is predictable, but 62 or more bits are random, so guessing a specific ID is still impractical.