UUID · 60 bits, 100 ns since 1582-10-15
UUID v1
Timestamp plus clock sequence plus node, historically a MAC address.
Key facts
| Timestamp | 60 bits, 100 ns since 1582-10-15 |
|---|---|
| Clock sequence | 14 bits |
| Node | 48 bits, often a MAC address |
| Ordering | Time based but field order is not sortable |
| Privacy | Node can identify a machine |
| Successor | v6 reorders the timestamp for sorting |
Why the timestamp is not sortable as text
The timestamp is split into low, middle and high fields for historical reasons, so the textual order is not chronological. v6 fixes this by putting the timestamp in the most significant bits, but v7 has largely replaced both for new systems.
The MAC address problem
When the node field is a real MAC address, the UUID reveals which machine generated it. Modern generators often use random node bits instead. If an identifier must not correlate records across databases, prefer v4 or v7 with random tail.
Frequently asked questions
Should I use v1 for new systems?
Usually no. Choose v7 for time-ordered identifiers; it avoids the node-address leak and sorts naturally.
Does v1 guarantee uniqueness?
It relies on the clock sequence and node to disambiguate. Bad clocks and duplicated node values can cause collisions.
What is v6?
A reordered v1 with the timestamp in the high bits so the UUID sorts chronologically.