Quick answer
Pick v7 for anything new. Use v6 only when you already have v1 IDs and want them to sort by time, since v6 holds the same data in a sortable order. Keep v1 only for compatibility with old systems. RFC 9562, the UUID standard, gives the same advice: use v7 instead of v1 and v6 where you can.
Three versions at a glance
Here are three IDs made at the same moment, 23 October 2026 at 09:30:00 UTC:
v1 5169dc00-cec4-11f1-9f2a-3f2a9c41d708
v6 1f1cec45-169d-6c00-9f2a-3f2a9c41d708
v7 01a16818-85c0-7b3e-9f2a-4c6d81e05a73
| v1 | v6 | v7 | |
|---|---|---|---|
| Clock | 100-nanosecond steps since 15 Oct 1582 | Same as v1 | Milliseconds since 1 Jan 1970 |
| Time bits | 60 | 60 | 48 |
| Sorts by creation time | No | Yes | Yes |
| Other bits | Clock sequence and node | Same fields as v1 | Random |
| Can contain a MAC address | Often | Allowed, not advised | No |
How v1 stores the time
Version 1 counts time in 100-nanosecond steps since 15 October 1582, the day the Gregorian calendar started. That count is a 60-bit number. For our example it is 1f1cec45169dc00 in hex.
The catch is how v1 lays that number out. It splits it into three parts and writes the lowest part first:
5169dc00is the low 32 bits, which change fastest.cec4is the middle 16 bits.1f1is the top 12 bits, after the version digit1.
- Timestamp, 60 bits
- Clock sequence
- Version, always 1
- Variant, 8, 9, a or b
- Node, 48 bits
Because the fastest-changing bits come first, the first group wraps around about every 7 minutes. An ID made 5 minutes after our example starts with 043a3a00, so it sorts before the earlier one. In a database index, v1 IDs behave almost like random ones.
After the time come two more fields. The clock sequence (9f2a here, including the variant bits) helps avoid duplicates if the clock goes backwards. The node (3f2a9c41d708) is 48 bits that were meant to be the machine’s network card (MAC) address. Many libraries now use a random node instead, but some, including Python’s uuid1(), still use the real MAC address by default.
How v6 reorders it
Version 6 keeps every field from v1 but writes the timestamp in the natural order, biggest part first:
- Start with the same 60-bit timestamp
1f1cec45169dc00 - Write the top 48 bits first
1f1cec45-169d - Add the version digit 6, then the last 12 bits
1f1cec45-169d-6c00 - Copy the clock sequence and node unchanged
1f1cec45-169d-6c00-9f2a-3f2a9c41d708
- Timestamp, 60 bits
- Clock sequence
- Version, always 6
- Variant, 8, 9, a or b
- Node, 48 bits
Now the string, and the 16 bytes behind it, sort by creation time. The conversion loses nothing, so you can turn a v1 into a v6 and back. The npm uuid package has v1ToV6() and v6ToV1() for this.
RFC 9562 says new v6 IDs should use a random clock sequence and node, though it still allows the old MAC address behaviour.
Where v7 is different
Version 7 is not a reshuffle of v1. It is a new design:
- A familiar clock. The first 48 bits are Unix time in milliseconds, the same number
Date.now()returns. No 1582 maths. - No node field. Everything after the time is random, so there is no hardware address to leak.
- Wide support. PostgreSQL 18 (
uuidv7()), Python 3.14 (uuid.uuid7()), .NET 9 (Guid.CreateVersion7()) and the npmuuidpackage all make v7 out of the box. Native v6 support is much rarer.
The trade-off is precision. v1 and v6 count in 100-nanosecond steps, while v7 counts in milliseconds. RFC 9562 lets v7 libraries use some random bits for extra precision or a counter, so IDs from the same millisecond can still sort in order.
Which one to pick
- New tables, new services, new APIs: v7.
- You already store v1 and want ordered indexes: convert to v6, or migrate new rows to v7.
- Another system requires v1: v1, with a random node if your library allows it.
If you are on MySQL, its UUID() function returns v1. UUID_TO_BIN(id, 1) swaps the first and third groups when it stores the bytes, which gives a similar sorting benefit to v6.
Good to know
All three reveal their creation time
Anyone can read the time out of a v1, v6 or v7. The UUID decoder shows it for any of them.
v1 may identify your machine
A v1 or v6 with a real MAC address points to the computer that made it. Don’t use them for public IDs unless you know the node is random.
Choosing between v4 and v7?
See UUID v4 vs v7 for when a fully random ID is the better fit.

