Version 4
(random)
822151e6-90c0-4e73-a151-e690c0fe73e4
Explanation from WikipediaA version 4 UUID is randomly generated. As in other UUIDs, 4 bits are used to indicate version 4, and 2 or 3 bits to indicate the variant(102 or 1102 for variants 1 and 2 respectively). Thus, for variant 1(that is, most UUIDs) a random version 4 UUID will have 6 predetermined variant and version bits, leaving 122 bits for the randomly generated part, for a total of 2122, or 5.3×1036(5.3 undecillion) possible version-4 variant-1 UUIDs. There are half as many possible version 4, variant 2 UUIDs(legacy GUIDs) because there is one less random bit available, 3 bits being consumed for the variant.
PerRFC 9562, the seventh octet's most significant 4 bits indicate which version the UUID adheres to. This means that the first hexadecimal digit in the third group always starts with a
4
in UUIDv4s. Visually, this looks like thisxxxxxxxx-xxxx-Mxxx-Nxxx-xxxxxxxxxxxx
, whereM
is the UUID version field. The upper two or three bits of digitN
encode the variant. Values are8
,9
,A
orB
for the 2 bit indication, valuesC
orD
for the 3 bit indication. For example, a random UUID version 4, variant 1 could be8D8AC610-566D-4EF0-9C22-186B2A5ED793
.