UUID Generator (version 7)

Generate a Universally Unique IDentifier (UUID) version 7 (time-ordered), a 128-bit identifier that combines a Unix timestamp with random data for natural chronological sorting. Defined in RFC 9562.

Generated UUID:

 

Related Tools

More about UUID version 7

UUID version 7 is a time-ordered UUID defined in RFC 9562 that embeds a Unix timestamp for natural chronological sorting while maintaining randomness for uniqueness. Here is how a UUID version 7 is constructed:

  1. A 48-bit Unix timestamp in milliseconds is placed in the most significant 48 bits (bits 0-47). This provides millisecond precision and supports dates far into the future.

  2. The version number 0111 (7 in hexadecimal) is set in bits 48-51.

  3. 12 bits of cryptographically secure random data fill bits 52-63.

  4. The variant 10 is set in bits 64-65 per RFC 4122.

  5. 62 bits of cryptographically secure random data fill bits 66-127.

The resulting UUID has the format: xxxxxxxx-xxxx-7xxx-yxxx-xxxxxxxxxxxx, where the 7 indicates version 7 and y represents the variant. UUID v7 is increasingly preferred over UUID v4 for database primary keys because the embedded timestamp enables natural chronological ordering, which improves database index performance and makes UUIDs roughly sortable by creation time.