FreeAI.DevTools

UUID v1 Generator

What a UUID v1 is, when to use it, and a generator scoped to this version. Runs in your browser.

What is a UUID v1?

A UUID v1 encodes a 60-bit timestamp counting 100-nanosecond intervals since October 15, 1582, plus a 14-bit clock sequence and a 48-bit node ID, historically the machine's MAC address. Values are roughly time-ordered, but the timestamp bytes are stored low-order first, so sorting the raw value does not sort by time.

Version:

Anatomy: Gregorian time, clock sequence, node ID

The v1 layout is the oldest in the UUID family. Its 60-bit timestamp counts 100-nanosecond ticks from the adoption of the Gregorian calendar on 1582-10-15, giving sub-microsecond precision that later versions dropped. A 14-bit clock sequence guards against duplicates when the system clock is set backwards or the generator restarts, incrementing so that reused timestamps still yield distinct values. The final 48 bits are the node ID, which the original spec filled with the network card's MAC address so that two machines could never mint the same UUID. The awkward part is bit order: the low bits of the timestamp come first in the encoded value, so v1 UUIDs do not sort chronologically as plain bytes, which is exactly the defect v7 was designed to fix.

The privacy leak, and where v1 still appears

Embedding the MAC address turned out to be a de-anonymization gift. The best-known case is the Melissa virus in 1999, where a GUID inside the circulating Word document carried a MAC address that helped investigators tie the file to its author's machine. Modern v1 implementations mitigate this by substituting 48 random bits for the MAC, which RFC 9562 explicitly endorses.

You will still meet v1 in the wild: legacy Java systems, older Microsoft stacks, and Cassandra, whose timeuuid type is a v1 UUID used for time-ordered clustering keys. For new code, prefer v7, which keeps time-ordering without the MAC history or the scrambled byte layout.

Frequently asked

Can a UUID v1 leak my MAC address?
Historically yes. The classic v1 algorithm places the host's 48-bit MAC address in the node field of every UUID it mints, and that detail helped trace the Melissa virus author in 1999. Modern libraries usually substitute random bits, which RFC 9562 endorses, but any v1 from an old generator may still carry a real MAC.
Are UUID v1 values sortable by creation time?
Not as raw bytes. The 60-bit timestamp is split with its low-order bits first, so lexicographic sorting scrambles chronological order. Cassandra's timeuuid works because the database reorders the timestamp fields before comparing. If you want IDs that sort by time everywhere, use UUID v7 instead.
Should I use UUID v1 or v7 in new projects?
Use v7. Both embed a timestamp, but v7 sorts correctly as plain bytes, never carried a MAC address, and is the version RFC 9562 recommends for time-ordered keys. The main reason to touch v1 today is interoperating with a legacy system or a Cassandra timeuuid column that already expects it.

More in this series

// The subscription desk

The Inference Report

The weekly briefing for AI engineers: model releases, pricing moves, benchmarks, and the news that changes what you should build with and what it costs. Every Tuesday, 5-minute read. No fluff.

Join AI engineers who stopped overpaying for tokens. Unsubscribe anytime.