UUID v1 Generator
Generate time-based UUID v1 values. Each UUID encodes a 60-bit timestamp from the Gregorian calendar epoch, a clock sequence, and a node identifier.
What is UUID v1?
UUID v1 is the original time-based UUID version defined in RFC 4122. It encodes the current date and time as a 60-bit count of 100-nanosecond intervals since 00:00:00.00, 15 October 1582 (the start of the Gregorian calendar reform). This timestamp is split across three fields of the UUID to maintain backward compatibility with the original Apollo Network Computing Environment specification.
Because the timestamp is embedded in the UUID, a v1 UUID can be decoded to reveal when it was generated. This makes v1 useful for audit trails and forensic analysis, but it also means UUIDs generated from the same machine within the same 100ns window will differ only in the clock sequence - and may inadvertently disclose information about your server's MAC address or timing.
UUID v1 Layout
A v1 UUID has the structure tttttttt-tttt-1ttt-cccc-nnnnnnnnnnnn where:
time_low (32 bits)
The low field of the 60-bit timestamp. The least significant 32 bits of the UUID timestamp. Because the least significant bits are in the first field, v1 UUIDs do not sort chronologically by string comparison.
time_mid + time_hi (28 bits)
The middle and high fields of the timestamp. The high 4 bits of time_hi_and_version are fixed to 0001 (version 1).
clock_seq + node (80 bits)
A 14-bit clock sequence to prevent duplicates when the clock is set backwards, plus a 48-bit node identifier (historically a MAC address; this generator uses random bytes for privacy).
Privacy Considerations
Early UUID v1 implementations used the host machine's MAC address as the node field, which made it possible to identify the machine that generated a UUID. This was a genuine privacy concern: UUIDs embedded in publicly visible documents (like Microsoft Word files) could reveal which network interface card created the document.
RFC 4122 permits using a randomly generated node value instead of a real MAC address. This generator always uses cryptographically random bytes for the node field, eliminating the MAC address disclosure risk. The embedded timestamp is still present and will reveal when the UUID was generated.
Decoding a v1 UUID Timestamp
To recover the generation time from a v1 UUID, reassemble the 60-bit timestamp from its three split fields, subtract the Gregorian epoch offset (122,192,928,000,000,000 100ns intervals), and convert to your target time unit. Use the Validate & Inspect tool on this site to decode any v1 UUID's timestamp automatically.
// Pseudocode for extracting timestamp from UUID v1:
time_low = uuid[0..7]
time_mid = uuid[9..12]
time_hi = uuid[15..17]
ts60 = time_hi + time_mid + time_low // reassembled
unix_ms = (ts60 - 122192928000000000) / 10000
When to Use UUID v1
- Apache Cassandra: Cassandra's
timeuuidtype is UUID v1. It is used as a time-series key in time-series tables and is sortable within Cassandra's internal comparator. - Audit and compliance logging: When you need to prove when a record was created and be able to recover that time from the identifier alone, v1's embedded timestamp is a reliable source.
- Legacy system interoperability: If you are integrating with an older system that requires UUID v1 specifically (some SOAP services, DCE RPC), generating v1 is necessary for protocol compliance.