wire / identifier / uuidv7
UUIDv7 is a 128-bit UUID whose first 48 bits are a big-endian Unix timestamp in milliseconds, followed by the 4-bit version (0b0111), 12 random bits (rand_a), the 2-bit variant (0b10), and 62 random bits (rand_b). Because the time prefix is most-significant, v7 strings sort lexicographically in creation order, giving database-index locality without leaking a MAC address — the modern default for new keys.
aka: UUID v7 · time-ordered UUID · version 7 UUID · sortable UUID
spec: RFC 9562 §5.7
example:
017f22e2-79b0-7cc3-98c4-dc0c0c07398f
| field | bits | meaning |
|---|---|---|
| unix_ts_ms | 48 | Big-endian Unix timestamp in milliseconds since 1970-01-01 UTC. |
| ver | 4 | version = 0b0111 (7). |
| rand_a | 12 | Random (or sub-millisecond/monotonic counter, implementation choice). |
| var | 2 | variant = 0b10 (RFC 9562). |
| rand_b | 62 | Random bits. |
agent: curl -H 'accept: application/json' wire.phall.io/identifier/uuidv7
or /identifier/uuidv7.json