1001Ferramentas
🔍Dev

UUID Parser

Decompose a UUID into version (1, 3, 4, 5, 6, 7, 8), variant, and when applicable, timestamp and node. Supports UUIDs with or without dashes.

Reading a UUID: version, variant and what it gives away

The 32 hexadecimal digits of a UUID are not all random. Four bits carry the version and two or three carry the variant, which leaves 122 bits of content in the common form. Paste a value and the page splits the five fields, shows the bytes and, for the versions that carry time, extracts the moment of generation.

Version 1 holds a 60-bit clock counting 100-nanosecond intervals since 15 October 1582 — the day the Gregorian calendar took effect. Alongside it sits the MAC address of the machine that generated it. That combination is precisely the problem: a v1 UUID in a public file reveals when the record was created and on which network card, which has been enough to identify the author of a leaked document.

Version 7, standardised in 2024 in RFC 9562, fixes the other side. It puts 48 bits of Unix milliseconds at the front, in increasing order, and fills the rest with randomness — no MAC. The gain is in databases: a key that grows with time always inserts at the end of the index, while v4 scatters inserts across the whole tree and forces the server to keep far more pages in memory.

Frequently asked questions

What do the variant bits indicate?
Which layout the UUID follows. The current standard uses 10 in the first two bits of the ninth byte; 0 marks the old Apollo NCS format and 110 the Microsoft one. If the variant is not the standard one, the four version bits may not mean a version at all — reading the rest of the value changes.
What is the difference between v3 and v5?
The hash function: v3 uses MD5 and v5 uses SHA-1. Both turn a namespace plus a name into a UUID deterministically, so the same name always yields the same value. For a new project use v5 — not for the UUID's security, but because MD5 is being removed from libraries and restricted environments.
v4 or v7 for a primary key?
v7 in most cases, for index insert locality. The caveat is that v7 exposes the record's creation time, which is sometimes sensitive information — in a user table, for instance, it reveals sign-up order. Where that matters, v4 remains the right choice.

Related Tools