Articles
6 articles on picking an ID format, reading one apart bit by bit, and what each one costs you. Every example runs in your browser.
Pillars
How to Choose an ID Format
Pick by what the ID has to do: UUID v7 for database keys, Nano ID for URLs people read, UUID v5 when the same input must give the same ID.
Updated
Every UUID Version, and Which One You Want
RFC 9562 defines eight versions. Four matter in new code: v4 for random, v5 for reproducible, v7 for sortable, v8 for custom layouts.
Updated
Using IDs as Database Keys
What a random 128-bit primary key costs in insert throughput, index size and cache locality, and how much of it a time-ordered ID gives back.
Updated
What Your IDs Give Away
A UUID v4 is 122 bits from a CSPRNG and is not guessable. Every other format here publishes a timestamp, a MAC address, or a row count.
Updated
Length, Alphabets, and How Much Entropy You Need
Entropy is bits, not characters. A 21-character Nano ID carries 126 bits against a UUID v4's 122, in 15 fewer characters.
Updated
Explainers
What a MAC Address Is, and Which IDs Actually Contain One
UUID v1 and v6 put a 48-bit node field in the last six bytes, and it may hold a MAC address. No other format on this site contains one.
Updated