UUID generator · formatUUID v7 — generator and how it works
Version 7 starts with the creation time in milliseconds followed by 74 random bits. Values therefore sort in creation order and are appended to the end of an index — which made v7 the recommended primary key. It was standardised in RFC 9562 in 2024.
Generator UUID v7
the format is set — all settings and the checker are in the full generatorHow it is built: UUID v7
When to use it
- The primary key of a large table: inserts go to the end of the index and pages do not fragment.
- IDs for events and logs that are handy to sort by the ID itself.
- A replacement for v1 and v6 when you want time inside but not the machine address.
How it differs from its neighbours
Against v4: v7 is ordered and kind to indexes, but it reveals the creation moment to the millisecond, which may be too much for public links. Against ULID: both sort by time and are built almost alike (48 bits of time first), but v7 is an RFC standard and fits a uuid column, while ULID is shorter to write — 26 characters instead of 36. Our generator is monotonic within a batch: inside one millisecond the random part grows by one.
Format comparison
Frequently asked questions
Updated