What is a NanoID?
A NanoID is a short, random identifier. By default it has 21 characters from a 64-character URL-safe alphabet (A-Z, a-z, 0-9, underscore and hyphen). That gives about 126 bits of randomness, comparable to a standard random UUID, in a shorter string.
You choose the length and the alphabet. A smaller alphabet or shorter ID means fewer bits and a higher chance of two matching. The tool shows the number of bits so you can judge this. Every character is chosen by unbiased sampling from your browser's secure random generator, so some characters are not favored over others.
How to use the NanoID Generator
- Set the length.
- Choose how many IDs you need and the alphabet.
- Press the button to generate.
- Copy or download the list.