Not quite random.

A UUID looks like 32 random hex digits. One of them names the version, and the version decides what the others are made of: time, a hash, a machine, or chance.

Version 6. The v1 clock with its bits in order, so the ids sort by the time they were made.

1ec9414c-232a-6b00-b3c8-9f6bdeced846
The example printed in RFC 9562.

Field by field

What each part of the UUID above is for, and what these particular digits say.

  1. time_high32 bits

    The top 32 bits of the same 60-bit clock v1 uses. The slowest-moving bits come first, so v6 ids sort by time.

  2. time_mid16 bits

    The middle 16 bits of the clock.

  3. ver4 bits

    The version, always the 13th digit. 6 means Gregorian time, reordered to sort. In binary, 0110.

  4. time_low12 bits

    The lowest 12 bits of the clock. Together they say 2022-02-22 19:22:22.0000000 UTC.

  5. var2 bits

    The variant: the first two bits of digit 17, always 10 in an RFC 9562 UUID. That is why digit 17 is 8, 9, a or b. Here b is 1011: the variant, then two bits of clock_seq.

  6. clock_seq14 bits

    A counter bumped when the clock goes backwards, as in v1.

  7. node48 bits

    The node id, as in v1: usually random, with the multicast bit set. Here 9f:6b:de:ce:d8:46, with the multicast bit set: random.

Every version, one grid

The examples printed in RFC 9562. Whatever the version, the 13th digit names it and the 17th carries the variant.

Which one? For database keys, v7: it sorts by the time it was made. For ids that should give nothing away, v4. When the same name must always map to the same id, v5. The rest serve old systems (v1, v3), moves off v1 (v6) and layouts of your own (v8). There is no v2: RFC 9562 leaves it to DCE Security.