OneFreePlace
TOOL #367 · NANO ID LAB

NanoID Generator

Generate secure Nano IDs with the current URL-safe default alphabet or your own alphabet and size. Create large batches locally, inspect entropy and collision exposure, add safe public-ID prefixes, and copy implementation-ready Nano ID code.

Nano ID 6 default alphabet21-char default1–256-symbol custom alphabetWeb CryptoMask + rejection samplingCollision labJS + CLI recipes100% local
Alphabet—
Nano ID size—
Entropy / ID—
Search space—
Batch collision risk—
Generated—

Generated IDs

Compatibility + safety QA

JavaScript recipe

CLI

Scale simulator

How to read the number

Nano ID collision risk behaves like other random identifiers: the birthday effect matters before the entire space is exhausted. Use the simulator for sizing, but still enforce a unique index and retry on conflict in persistent systems.

Default Nano ID

The standard configuration uses a 64-symbol URL-safe alphabet and 21 characters, yielding roughly 126 random bits.

Custom alphabet

Nano ID supports custom alphabets of up to 256 symbols. OneFreePlace removes duplicate symbols before generation and applies the same mask/rejection principle.

Public prefixes

Prefixes such as usr_ or team_ improve readability. They do not add random entropy; the Nano ID portion still determines collision resistance.

Database use

Random IDs should still sit behind a unique constraint. If an insertion conflicts, generate a fresh ID and retry.

Security

The generator uses browser Web Crypto rather than Math.random(). Output is created locally and is never uploaded.

Compatibility note

The default alphabet matches the current Nano ID 6 compression-optimized URL alphabet; custom mode follows the documented 1–256-symbol safety limit.