UUID Format, Versions, and Variants

The 8-4-4-4-12 textual layout, the version and variant fields, and the RFC that defines them.

The canonical UUID text is 32 hexadecimal digits in five groups: 8-4-4-4-12, for example 0197f0a4-1c2d-7b3e-9f10-4a2b6c8d0e1f. The hyphens are formatting only; the value is the 16 bytes.

01Fields

  • The 13th hexadecimal digit is the version, such as 4 or 7.
  • The 17th hexadecimal digit encodes the variant; the RFC 9562 variant has its top bits set to 10.
  • Bits not used by the version and variant fields are free for data.

02Limitations

The format describes how the bits are laid out, not whether the identifier is unique or trustworthy; that depends on how it was generated.

Sources

  1. RFC 9562: Universally Unique IDentifiers (UUIDs) — IETF (accessed 2026-09-27)