Both versions occupy 128 bits and use the RFC variant, but they answer different storage questions. UUIDv4 spends 122 data bits on randomness. UUIDv7 places Unix milliseconds first and leaves 74 data bits random, making ordinary byte order roughly follow creation time.

What the bits mean

A UUIDv4 contains random data except for four version bits and two RFC variant bits. A UUIDv7 begins with a 48-bit unsigned Unix-millisecond value, then the version nibble, random data, the RFC variant and more random data. The timestamp is visible metadata, not a signature. Two UUIDv7 values created in one millisecond still depend on their random fields and are not guaranteed to sort by call order.

Choose for the receiving system

UUIDv4 is widely supported and reveals no creation time. UUIDv7 can improve locality in indexes that compare UUID bytes in canonical order and can make logs easier to scan. Confirm how the database stores and sorts UUID values before assuming a benefit. Text collation, byte order, driver conversions and a database-specific GUID layout can change the observed ordering.

Keep uniqueness claims precise

Neither version mathematically guarantees global uniqueness. The practical collision probability depends on correct random generation, volume and implementation. Use a cryptographic browser source, preserve all 128 bits, and enforce a unique constraint when the receiving data model requires one. UUIDLens generates each value from fresh Web Crypto bytes but cannot inspect identifiers generated elsewhere or certify a distributed system.