Lesson 2
UUID Versions
The difference between random, time-based, and name-based UUID versions.
The version digit tells you how a UUID was produced. It is the first character of the third group.
Common versions include:
- v1: time and node based; can reveal timing and machine-related information
- v3 / v5: deterministic name-based UUIDs using a namespace and name
- v4: random UUIDs; the most common general-purpose choice
- v6 / v7 / v8: newer layouts from RFC 9562, often used for sortable or custom schemes
For everyday development, UUID v4 is usually the simplest safe default: no central coordination, no embedded timestamp, and broad library support.