Random UUID
|v4
a98fc0c1-8f26-413b-86c1-16d1860263fe
Time based UUID
|v6
1f1138c8-8cde-64a0-9cf9-8903b74df904
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.
019c9d24-ffea-7578-8c54-2b3a782151d1
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).
1f1138c8-8cde-64a1-951c-2f6fd93b57df
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.
166ab571-2ba9-4b73-a732-f247fe358574
UUID v1
|Time-based + MAC Address
High uniqueness, sortable by time. Privacy concern due to including the generating machine's MAC address.
88cde4a2-138c-11f1-9cf9-8903b74df904