Nano ID Generator Online

Generate URL-safe, collision-resistant Nano IDs with a custom size and alphabet, right in your browser.

The Nano ID Generator runs entirely in your browser. Every id is generated locally using the Web Crypto API and nothing is uploaded to ArrayKit.

Built and maintained by Udit Agarwal

Open the UUID Generator

About Nano ID Generator

The Nano ID Generator creates short, URL-safe, collision-resistant unique identifiers using the same rejection-sampling algorithm as the popular nanoid library. It defaults to a 21-character id drawn from a 64-character url-safe alphabet, giving you roughly the same collision resistance as a UUID in about a third of the length. You can dial the size up or down, generate a batch of ids at once, and swap in your own custom alphabet — for example digits only, or a case-insensitive set for ids read aloud over the phone. It is useful for database keys, session tokens, short link slugs, and any place a UUID feels too long. Everything runs locally in your browser, so no id ever touches a server before you decide to use it.

Features

  • Generates URL-safe Nano IDs with the default 21-character, 64-character alphabet
  • Adjustable size from 2 to 128 characters per id
  • Generate a batch of up to 500 Nano IDs in one click
  • Custom alphabet support — restrict output to digits, hex, or any character set you choose
  • Unbiased rejection sampling avoids the modulo bias of naive random-index generators
  • One id per line, ready to copy or paste into code, spreadsheets, or migrations
  • Uses your browser's cryptographic random number generator for every id
  • Runs entirely on your device — no id is ever sent to a server

How to use the Nano ID Generator

  1. Set the id size (21 by default) and how many ids you need
  2. Optionally replace the alphabet with your own character set
  3. Click Generate to draw fresh ids from your browser's crypto RNG
  4. Copy the list, or click Generate again for a new batch

Example

Input

size = 21

Output

V1StGXR8_Z5jdHi6B-myT

A 21-character Nano ID drawn from the default 64-character url-safe alphabet.

Common errors & troubleshooting

  • The custom alphabet field is rejected or produces an error. — The Nano ID Generator needs at least 2 unique characters in the alphabet; duplicate characters are automatically de-duplicated before generating.
  • IDs generated with a short custom alphabet look longer to type than expected. — A smaller alphabet needs more characters to reach the same collision resistance — increase the size when you restrict the alphabet, for example to digits only.
  • Not sure how many Nano IDs are safe to generate without collisions. — At the default 21-character size you would need to generate around a trillion ids per second for a thousand years before a 1% chance of a single collision — shrink the size only if you also expect far fewer ids.

Frequently asked questions

What is a Nano ID?
A Nano ID is a short, URL-safe, random unique identifier, typically 21 characters long, generated with cryptographically secure randomness. It offers similar collision resistance to a UUID in a much shorter string.
How is a Nano ID different from a UUID?
A UUID is a fixed 36-character format with a defined structure (version, variant bits). A Nano ID has no fixed structure — you choose the size and alphabet — and is shorter while remaining just as safe against collisions at its default settings.
Can the Nano ID Generator use a custom alphabet?
Yes. Replace the alphabet field with any set of unique characters — for example digits only, hex characters, or a case-insensitive set — and the generator will draw ids exclusively from that set.
Does the Nano ID Generator upload the ids I create?
No. Every Nano ID is generated locally using your browser's cryptographic random number generator. Nothing is sent to a server, so the ids you create are only ever visible on your device.
Is the Nano ID Generator's output biased toward certain characters?
No. It uses unbiased rejection sampling, discarding random bytes that fall outside the alphabet's range instead of reducing them with modulo, so every character in the alphabet has an equal chance of appearing.
What size should I pick for a Nano ID?
The default of 21 characters is a safe general-purpose choice. Shorter ids (10-14 characters) work well for short link slugs with lower volume; longer ids suit high-volume systems that need stronger collision resistance.

Related tools

  • UUID Generator — Generate up to 1,000 UUIDs at once: random v4, time-ordered v7 or the NIL UUID.
  • ULID Generator — Generate sortable ULIDs and decode a ULID to its timestamp, in your browser.
  • Snowflake ID Generator — Generate and decode Twitter and Discord style Snowflake IDs, with timestamp extraction.
  • Password Generator — Generate strong, random passwords with a strength meter (crypto-secure).
  • Base58 Encoder / Decoder — Encode and decode Base58 (Bitcoin / IPFS alphabet), with hex and text input.
  • Hash Generator — SHA-256 / SHA-1 / SHA-384 / SHA-512 via the Web Crypto API.

Guides

More Encode / Decode tools

  • Vigenère Cipher — Encode and decode Vigenère, autokey and Beaufort ciphers, with key-length hints.
  • QR Code Reader — Scan a QR code from an image, a screenshot or your camera and see what is inside — links, Wi-Fi, contacts and payments.
  • QR Code with Logo — Put your logo in a QR code and restyle its colours, shapes and frame, with a live check that it still scans.
  • UPI QR Code Generator — Make a UPI payment QR code from a UPI ID with an optional amount and note, and print a Scan to pay card.
  • vCard QR Code Generator — Turn contact details into a QR code phones can save in a tap, as vCard 3.0, 4.0 or MECARD, with a .vcf download.
  • WhatsApp QR Code Generator — Create a wa.me chat link and QR code from a phone number and an optional first message.
  • Bulk QR Code Generator — Turn a list or a CSV into up to 500 QR codes as a ZIP of PNG or SVG files, or a printable labelled sheet.
  • Unzip Files Online — Open a ZIP archive in your browser, preview files and extract one or all of them without uploading anything.
  • Base64 Encode / Decode — UTF-8 safe Base64 encoding and decoding.
  • URL Encode / Decode — Encode and decode URL components.
  • HTML Escape / Unescape — Escape and unescape HTML special characters and entities.
  • Number Base Converter — Convert integers between binary, octal, decimal and hex.

See all Encode / Decode tools (31) · All tools