Nano ID + ULID Generator

Generate cryptographically secure short IDs in your browser. Nano ID — the modern UUID alternative (24k+ GitHub stars). ULID — lexicographically sortable, DB-friendly. Zero server, zero tracking.

001
SETTINGS
4128
11000
A-Za-z0-9_-
COLLISION PROBABILITY
For 1 million IDs with length 21 and alphabet 64 chars: < 10⁻³⁰ (virtually impossible)
002
CODE SNIPPETS
// npm install nanoid
import { nanoid, customAlphabet } from 'nanoid';

// Default URL-safe (length 21)
const id = nanoid();
console.log(id); // e.g. "V1StGXR8_Z5jdHi6B-myT"

// Custom length
const shortId = nanoid(10);

// Custom alphabet
const alphabet = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
const alphanumId = customAlphabet(alphabet, 21)();