Which UUID should I use?
A developer-friendly guide to picking the right UUID type for the job.
Quick Guidance
Start with the shortest answer, then drill into the full type guide below.
Use UUID v7 for most new applications.
Use UUID v4 when you need random UUIDs and broad compatibility.
Use UUID v5 when you need the same input to always generate the same UUID.
Use UUID v1 or v6 only when you specifically need timestamp-based UUIDs for legacy or compatibility reasons.
Recommended
1 UUID types in this group.
Recommended
Common
1 UUID types in this group.
Common
Deterministic
2 UUID types in this group.
Deterministic
UUID v5
Namespace-plus-name UUID using SHA-1 hashing.
Deterministic
Advanced
3 UUID types in this group.
Advanced
UUID v1
Timestamp and node-based UUID from older standards.
Advanced
UUID v6
Reordered timestamp UUID for improved sorting behavior.
Advanced
Special
2 UUID types in this group.
Special
Nil UUID
All-zero UUID used as a sentinel placeholder value.
Special