Nano ID Generator
Draw short, URL-friendly identifiers at the length and alphabet you choose — a smaller UUID for links, filenames and database rows. They are drawn on your device and never leave your browser.
A Nano ID does a UUID's job in less space: same amount of chance behind it, about half the characters, and nothing in it that a URL, a filename or a double-click has to work around. Set the length and the characters, and take one or a hundred.
Your Nano ID
Randomness: Very high, 126 random bits
Take the batch with you
One identifier per line, as a plain text file — the shape a seed script, a spreadsheet or a fixture usually wants.
Customize
21 characters in the default alphabet is the Nano ID standard, chosen to match a UUID's collision odds in less space. Shorter is tempting for a URL and gets guessable fast — the meter above tracks it.
Each one is drawn on its own, so a batch is exactly as unique as the same number of separate visits to this page.
Characters used
-_0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
These 64, each equally likely at every position. Every draw goes through the same rejection sampling the rest of this site uses, so an alphabet that is not a power of two is still even.
Room before a repeat
The figure comes from the birthday bound — the point where enough identifiers exist that any two matching becomes worth mentioning at all. Compare it against how many rows you actually expect, rather than against the biggest number available.
Recent identifiers
Nothing here yet. Identifiers you generate are kept on this device only, so you can pick one up again if you close the tab.
Smaller than a UUID, and why that works
A UUID writes 122 bits of chance in 36 characters, because hex only carries four bits per character and four dashes carry none. Nano ID uses 64 characters instead of 16, which is six bits each, so 21 of them hold 126 bits — more randomness than a UUID, in well under two-thirds of the space, and with nothing in it that a URL has to escape.
The alphabet is the setting that matters most, and it is easy to under-read. Dropping to digits takes each character from six bits to a little over three, so the same length carries half as much; 21 characters in the alphabet you have chosen come to 126 bits, against 126 in the default one. Shortening the id costs the same way. Both are reasonable trades — a shorter link, a case-insensitive filename — as long as they are made against a real number rather than a feeling.
Unique is not the same as unguessable, and this is the tool where the two get confused most often, because a short Nano ID looks exactly like a share link. At 126 bits it takes around 1.3 × 10^18 identifiers before two are likely to match — but if the id is the only thing standing between a stranger and the thing it names, collisions were never the risk. Enumeration was. Draw a token for that, and keep identifiers for identifying.
What Nano ID does not have is a version, a variant or a timestamp. It is randomness and an alphabet, which is why an id from this page is indistinguishable from one your own library would produce with the same two settings, and why nothing here is reserved or registered anywhere.
Everything happens on your device. Your identifiers never leave this browser.