UUID generator · Guide
UUID v4 Decoder and v7 Checker: Reading Version and Timestamp
A UUID is not opaque. Two positions always tell you what kind it is, and some versions carry a readable timestamp — which is useful for debugging and worth knowing about for privacy.
Version and variant
The first character of the third group is the version. The first character of the fourth group is the variant, and for RFC 9562 UUIDs it is 8, 9, a or b:
36b8f84d-df4e-4d49-b662-bcde71a8764f -> version 4 (random)
0191a2b3-c4d5-7abc-8def-0123456789ab -> version 7 (time-ordered)
6ba7b810-9dad-11d1-80b4-00c04fd430c8 -> version 1 (time + MAC)A value whose variant nibble is outside 8-b is not an RFC 9562 UUID — usually a hand-rolled generator that filled all 128 bits randomly.
Extracting a v7 timestamp
The first 48 bits of a v7 are Unix milliseconds, so creation time reads straight out:
const ms = parseInt(uuid.replace(/-/g, '').slice(0, 12), 16);
new Date(ms).toISOString();v1 is different: its timestamp counts 100-nanosecond intervals since 1582 and is split across three fields in reverse order, so it needs reassembling rather than a simple slice.
What a v4 tells you
Nothing beyond version and variant. There is no timestamp, no machine identifier and no sequence — 122 random bits and no structure to recover.
That is exactly why v4 remains the right choice for public identifiers: a decoder learns nothing about when the record was created or how many exist.
Validating
^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$This accepts any RFC version while still checking the variant. Pin the version digit if you require a specific one — and normalise case before comparing, since hex is case-insensitive and RFC 9562 asks for lowercase output.
Frequently asked questions
How do I tell a UUID version?
Read the first character of the third group.
Can I get a creation time from a v4?
No. A v4 contains no timestamp.
What does a variant outside 8-b mean?
It is not an RFC 9562 UUID — usually a generator that skipped setting the variant bits.
Ready to try it?
Open the free browser-based UUID generator and apply what you just read — no sign-up, runs locally.
Open the UUID generator tool