Random UUID
|v4
eca2add2-6f0f-4b6a-ae70-d74444fe4f0b
Time based UUID
|v6
1f0e61f7-bc8f-6eb0-b520-c83c95986d3c
UUID v7
|Time + Random
Uses a 48-bit Unix epoch timestamp (millisecond precision) followed by random bits. Time-sortable and optimized for better database indexing than V1. Considered the modern best practice.
019b7370-da1c-7774-94fe-af4caa565ad6
UUID v6
|Reordered Time-based
Time-based like V1 but reorders the bits to be monotonically increasing (better for database indexing). Does not expose the MAC address (often uses a random node ID instead).
1f0e61f7-bc92-65c0-bf64-e38ec272cb21
UUID v4
|Random (Pseudo-random numbers)
Maximum unpredictability and privacy. Not sortable by time. Higher (but still very low) theoretical collision chance compared to time-based.
7d6f1ba0-8631-47c4-9c5a-2ff4e2695eca
UUID v1
|Time-based + MAC Address
High uniqueness, sortable by time. Privacy concern due to including the generating machine's MAC address.
7bc925c1-e61f-11f0-b520-c93c95986d3c