Skip to content

NanoID Generator

Embed

Paste this where you want NanoID Generator on your site. Adjust the height to fit.

<iframe src="https://www.browserutils.dev/embed/nanoid-generator/" width="100%" height="500" frameborder="0" loading="lazy" title="NanoID Generator"></iframe>
<p style="font-size:12px;margin:4px 0 0"><a href="https://www.browserutils.dev/tools/nanoid-generator/">NanoID Generator</a> by BrowserUtils</p>

Generate compact, URL-friendly unique IDs.Runs in this tab.

Alphabet:
F86j_b49q2r2QH5JC-xHd

Entropy: ~126 bits per ID

Next step

About NanoID Generator

Free online NanoID generator. Create compact, URL-friendly unique identifiers with configurable alphabet and length. A modern alternative to UUID. It runs in your browser. Nothing is sent to a server.

Questions

What is NanoID?
NanoID is a tiny, secure, URL-friendly unique string ID generator. With its default alphabet of 64 characters and length of 21, it provides a collision probability similar to UUID v4.
How does NanoID compare to UUID?
NanoID is shorter (21 chars vs 36), URL-friendly by default, and uses a configurable alphabet. UUIDs follow a strict format and are more widely recognized.
Can I customize the NanoID alphabet and length?
Yes, you can change the alphabet (e.g., only lowercase letters, or alphanumeric only) and the ID length. Shorter IDs are more compact but have higher collision probability.
Is NanoID safe for database primary keys?
Yes, NanoID with the default 21-character length and 64-character alphabet has a collision probability comparable to UUID v4, making it safe for most database use cases.
Does the NanoID generator work offline?
Yes, IDs are generated entirely in your browser using cryptographically secure randomness. No server call is needed.
What is the collision probability of a NanoID?
With the default 21-character length and 64-character alphabet, you would need to generate about 1 billion IDs per second for 4 million years to have a 1% probability of a single collision.

More in Hashing & Crypto

All 15 hashing & crypto