ZeroTool Workbench
Nano ID Generator
Generate Nano IDs online. Customizable size (1–128) and alphabet: URL-safe, alphanumeric, hex, numbers-only, or custom. Single or batch up to 100. 100% client-side, powered by the nanoid library.
How to Use
- Set Batch Count (1–100) to generate multiple IDs at once.
- Set Size (1–128 characters, default 21).
- Choose an Alphabet preset, or select Custom to enter your own characters.
- Click Generate.
- Click Copy on any row to copy a single ID, or Copy All to copy all as newline-separated text.
Nano ID vs UUID Comparison
| Feature | Nano ID (default) | UUID v4 |
|---|---|---|
| Length | 21 chars | 36 chars (with dashes) |
| Randomness | ~126 bits | 122 bits |
| URL-safe | ✓ Yes | ✓ Yes (without dashes) |
| Custom alphabet | ✓ Yes | ✗ No |
| Sortable | ✗ No | ✗ No |
| Timestamp-embedded | ✗ No | ✗ No |
Alphabet Reference
| Preset | Characters | Size |
|---|---|---|
| URL-safe (default) | A-Za-z0-9_- | 64 |
| Alphanumeric | A-Za-z0-9 | 62 |
| Numbers only | 0-9 | 10 |
| Lowercase hex | 0-9a-f | 16 |
Related Tools
- UUID Generator — generate standard UUID v4 identifiers
- ULID Generator — sortable IDs with embedded timestamps
FAQ
What is a Nano ID?
Nano ID is a small, secure, URL-friendly unique string ID generator. The default output uses 21 characters from the URL-safe alphabet (A-Za-z0-9_-), providing ~126 bits of randomness — comparable to UUID v4. Nano IDs are shorter, faster to generate, and have no dependencies on timestamps.
How does Nano ID compare to UUID?
UUID v4 is 36 characters (including hyphens). A default Nano ID is 21 characters with equivalent randomness (~126 bits). Nano IDs are URL-safe by default, have no separators, and allow custom alphabets and sizes — making them more flexible for URLs, filenames, and database keys.
What alphabets are available?
URL-safe (default): A-Za-z0-9_- (64 chars). Alphanumeric: A-Za-z0-9 (62 chars). Numbers only: 0-9 (10 chars). Lowercase hex: 0-9a-f (16 chars). Custom: enter any characters you want — duplicates are automatically removed.
How do I choose the right size?
The default size of 21 gives ~126 bits of randomness with the URL-safe alphabet. If you use a smaller alphabet (e.g., hex with 16 chars), you need a larger size to maintain the same collision probability. As a rule of thumb, each additional character adds log2(alphabet_size) bits.
Is this tool client-side only?
Yes. All ID generation happens in your browser using the Web Crypto API (crypto.getRandomValues). Nothing is sent to a server.