Encrypt Online
Theme

Certificates & Site Ops

How to tell which UUID or GUID version you have

Read the version and variant in a UUID or GUID by hand. A worked example shows which digit identifies the version and when a timestamp is available.

Encrypt Online Editorial Team2 min read

In a standard UUID or GUID, the first hex digit after the second hyphen gives the version. Check the first digit after the third hyphen too. A value of 8, 9, a, or b identifies the variant used by the UUID versions in RFC 9562.

Encrypt Online guide cover on a sand background with the headline "Read a UUID". Four open inspection corners surround the complete UUID label.

In brief

Text
f81d4fae-7dec-11d0-a765-00a0c91e6bf6
              ^    ^
              1    a

The third group starts with 1, so this is version 1. The fourth group starts with a, so it uses the standard UUID variant. Paste a value into the UUID and GUID inspector to check both fields.

Version and variant are the first checks

A hyphenated UUID has five groups of 8, 4, 4, 4, and 12 hexadecimal digits. Letter case makes no difference. The special all-zero (Nil) and all-one (Max) UUIDs have their own meanings. For those, report the special value instead of assigning a version from its third group.

Why this matters in logs and databases

A v1 or v7 UUID contains a timestamp. A v4 UUID contains random bits. A v5 UUID is derived from a name and namespace. Reading the version tells you which fields to interpret. It cannot identify the application that issued the ID.

Check a GUID copied from code

If a GUID is printed with braces, read the digits inside them. If you have a byte array, first format it with the API that produced it. Some GUID APIs store the first three fields in a different byte order from the displayed string.

See it in a small example

The value 2ed6657d-e927-568b-95e1-2665a8aea6a2 has a 5 in the version position and a 9 in the variant position. You can reproduce it with the DNS namespace and the name www.example.com in the UUID v5 generator.

What to verify

Common questions

Can I know exactly where a UUID came from just by inspecting it?

The version and variant describe its layout. A log or issuing system can tell you who created it.

Are GUID and UUID different here?

The version check works the same way on a GUID displayed in standard UUID text form.

References