Search tools

Quick search for tools

UUID v7 generator

Generate Unix timestamp-based UUID v7 with monotonic increasing properties.

Introduction to UUID v7
UUID v7 is a new generation of time-based UUID, using millisecond-precision Unix timestamps as the high bits plus random data. It provides global ordering and monotonic increasing properties.
Timestamp characteristics
UUID v7 uses millisecond-precision Unix timestamps as the most significant bits (first 48 bits), making it sort chronologically when ordered lexicographically, which is very beneficial for database indexing and time-based queries.
v7 vs v6
Both UUID v7 and v6 aim to provide time-sortable UUIDs, but v7 uses Unix timestamps instead of the specific format used by v1/v6. v7 is simpler and more consistent with existing time representations, making it the recommended choice for new systems.
Use cases
UUID v7 is suitable for scenarios requiring globally unique and time-ordered identifiers, such as event IDs in distributed systems, database primary keys, and log records. It is especially suitable for applications requiring queries or sorting by creation time.
Implementation status
UUID v7 is currently being defined in an IETF draft as a new version of UUID, not yet a formal standard, but its design is relatively stable and is being adopted by an increasing number of libraries and frameworks.
Monotonicity guarantee
UUID v7 provides globally monotonic increasing properties by first using timestamps and then random data. This makes it particularly suitable as a database primary key, avoiding random insert issues with B-tree indexes.