Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Universally unique identifier
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==== Version 4 (random) ==== A 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 (10<sub>2</sub> or 110<sub>2</sub> 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 2<sup>122</sup>, or 5.3{{e|36}} (5.3 [[Names of large numbers|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. Per RFC 9562{{r|RFC 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 <code>4</code> in UUIDv4s. Visually, this looks like this <code>xxxxxxxx-xxxx-Mxxx-Nxxx-xxxxxxxxxxxx</code>, where <code>M</code> is the UUID version field. The upper two or three bits of digit <code>N</code> encode the variant. Values are <code>8</code>, <code>9</code>, <code>A</code> or <code>B</code> for the 2 bit indication, values <code>C</code> or <code>D</code> for the 3 bit indication. For example, a random UUID version 4, variant 1 could be <code>8D8AC610-566D-4EF0-9C22-186B2A5ED793</code>.<ref>{{Cite web |date=2023-11-06 |title=draft-ietf-uuidrev-rfc4122bis-14 |url=https://datatracker.ietf.org/doc/html/draft-ietf-uuidrev-rfc4122bis#name-version-field |url-status=live |archive-url=https://archive.today/20240417032603/https://datatracker.ietf.org/doc/html/draft-ietf-uuidrev-rfc4122bis#selection-6225.0-6239.184 |archive-date=2024-04-17 |website=[[University of Washington]]}}</ref>
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)