Skip to main content

UUID v4

UUID v4 is a universally unique identifier that is generated using random numbers. It is typically used to uniquely identify items without requiring a central registration authority, such as when generating random account numbers for customers in an online store.

Structure

The four bits of digit M are the UUID version, and the 1 to 3 most significant bits of digit N code the UUID variant. (See below.) In the example, M is 1, and N is a (10xx2), meaning that this is a version-1, variant-1 UUID; that is, a time-based DCE/RFC 4122 UUID.

xxxxxxxx-xxxx-Mxxx-Nxxx-xxxxxxxxxxxx

17bf7b5b-75a3-4530-a9a0-a8d8a4da7171