Identifiers Tools
5 toolsGenerate and validate unique identifiers — UUID, ULID, NanoID, CUID, and tokens
UUID vs ULID vs NanoID vs CUID — which should I use?
Modern applications have moved beyond UUID v4 as the default identifier. Different ID schemes optimize for different goals — sortability, length, URL-safety, or unguessability. Here is how the most common ID formats compare, and which one fits each use case.
| Format | Length | Alphabet | Sortable | Best for |
|---|---|---|---|---|
| UUID v4 | 36 chars (32 hex + 4 hyphens) | Hex 0-9, a-f | No — fully random | Default choice when you need a globally unique identifier and don't care about ordering. |
| UUID v7 | 36 chars | Hex 0-9, a-f | Yes — 48-bit Unix ms prefix | Modern replacement for v4 in databases — time-ordered, index-friendly, and still random enough for collision resistance. |
| ULID | 26 chars | Crockford Base32 (no I, L, O, U) | Yes — 48-bit Unix ms prefix | Lexicographically sortable IDs that are URL-safe and shorter than UUIDs. Great for logs, events, and primary keys. |
| NanoID | 21 chars (configurable) | URL-safe (A-Za-z0-9_-) | No | Short, URL-safe public IDs (share links, slugs, file names) where you want fewer characters than UUID. |
| CUID2 | 24 chars (configurable) | Lowercase a-z + 0-9 | No (intentional) | Distributed systems where unguessability matters and you don't want to leak creation time. |
Need a sortable ID?
Pick a time-ordered format so your database index stays sequential. Try the ULID Generator or generate UUID v7 in bulk.
Need a short, URL-friendly ID?
A 21-character NanoID is roughly as collision-safe as a UUID v4 but 15 characters shorter. The NanoID Generator also lets you customize the alphabet.
Need to hide creation time?
UUID v1, v7 and ULID all leak the moment the ID was generated. If that's a privacy or enumeration risk, use the CUID Generator (CUID2) instead.
Have an existing ID and want to parse it?
The UUID Validator decodes the version, variant, and embedded timestamp (for v1 and v7) from any canonical or braced UUID string.
Generating fixtures or seeding a database?
The Bulk UUID Generator produces up to 100,000 UUIDs at once and lets you download the list as a .txt file.
Already use UUIDs everywhere?
Keep the UUID Generator for one-off v4 IDs — and validate any UUID you find with the validator above.