Nano ID Generator
Generate URL-safe, short, unique IDs in bulk right in your browser. Choose the character set (default, alphanumeric, lowercase, uppercase, digits, or hex) and length freely — ideal when you need something shorter than a UUID.
ID Format Comparison
| Format | Length | Alphabet size | Sortable by creation order | Description |
|---|---|---|---|---|
| Nano ID | 21 chars by default (1-64 configurable) | 64 chars | No (fully random) | A short random ID made only of URL-safe characters. Alphabet and length are freely configurable. |
| UUID v4 | 36 chars (including 4 hyphens) | 16 chars (hex) | No (fully random) | A 128-bit identifier standardized in RFC 9562. The hyphen-separated hex notation is the standard form. |
| ULID | 26 chars | 32 chars (Base32) | Yes (leading 10 chars are a timestamp) | Starts with a millisecond-precision timestamp, so IDs can be sorted lexicographically by creation order. |
Tips
- Nano ID is generated with cryptographically secure randomness from the Web Crypto API and processed entirely in your browser — nothing is sent to toolbase.cc servers.
- The default 64-character alphabet (
A-Za-z0-9_-) contains no symbols or spaces, so it's safe to use directly in URL paths or file names. - Restricting the alphabet to digits-only or hex can match ID formats used by existing systems (e.g. order numbers that are digits only).
- Shorter IDs have a higher collision probability. Systems issuing many IDs should stick close to the default 21 characters, while small test datasets may be fine with 8-10.
- Increase the count and use "Copy all" to quickly generate seed or test data in bulk.
FAQ
Side Note — Why Nano ID Can Be Shorter Than a UUID
Nano ID is a JavaScript ID-generation library released in 2017 by Andrey Sitnik, the developer of PostCSS. Despite being dependency-free and tiny (only a few hundred bytes of code), its use of cryptographically secure randomness earned it recognition, and it now sees tens of millions of weekly npm downloads.
How short an ID can be comes down to how many distinct characters its alphabet has. A UUID uses only hexadecimal digits (16 symbols) to encode 128 bits, requiring 36 characters. Nano ID uses 64 symbols, so it can pack a comparable amount of randomness (126 bits by default) into just 21 characters. The reason is that each character carries more information (log₂64 = 6 bits versus log₂16 = 4 bits for hex).
The default settings (21 characters, 64-symbol alphabet) provide about 126 bits of randomness — roughly on par with UUID v4's 122 bits. Using the birthday-problem approximation, you would need to generate about 1.09×10¹⁹ IDs before the collision probability reaches 50%, so in practice there is little to worry about.