Understanding UUIDs
A Universally Unique Identifier (UUID) is a 128-bit label used for information in computer systems. The probability of duplicating a UUID is so close to zero that they are effectively unique across the entire world.


UUID Versions Explained
Different versions of UUIDs are generated using different algorithms, suitable for various use cases.
Version 4 (Random)
The most common version. Generated using random numbers. Ideal for primary keys when you don't need time-ordering.
Version 1 (Time-based)
Generated using the current time and the MAC address of the computer. Guarantees uniqueness per machine.
Version 5 (Name-based)
Generated from a namespace and a name using SHA-1 hashing. Deterministic: same name + namespace = same UUID.
Version 7 (Time-ordered)
A newer standard. Combines a timestamp with random data. Sortable by creation time, making it database-friendly.
Anatomy of a UUID
A standard UUID is a 32-character hexadecimal string, displayed in 5 groups separated by hyphens.
- It contains 32 hexadecimal digits (0-9, a-f).
- The groups are 8-4-4-4-12 characters long.
- The 'M' position indicates the UUID version (e.g., 4 for v4).


Learn More
For technical specifications and history, visit the Wikipedia page on UUIDs.