Santekno/tools

NanoID / ULID Generator

Generate compact unique IDs — NanoID (URL-safe, configurable length) or ULID (lexicographically sortable, time-encoded).

Processed in your browserUpdated · Jan 2026
Options
0 charslenalphabet×
Output
0 chars

How to use NanoID / ULID Generator

Paste your input on the left, choose the options you want, and the output appears instantly on the right. Everything runs in your browser — none of your data is sent to a server.

  • Paste or type your input in the INPUT panel
  • The output regenerates automatically as you type
  • Use Copy to put the result in your clipboard
  • Click Sample to load a working example

What is NanoID / ULID Generator?

NanoID / ULID Generator creates IDs better suited for modern apps than UUID v4. **NanoID** is 21 chars by default (≈149 bits entropy — collision-equivalent to UUID v4), URL-safe (A-Z, a-z, 0-9, _, -), and configurable length 2–256. **ULID** is 26 chars Crockford base32, lexicographically sortable by creation time (first 48 bits = ms timestamp, last 80 bits = randomness), monotonic mode prevents same-ms collisions and preserves order in tight loops. Decode mode shows each ULID alongside its embedded ISO timestamp. Bulk mode generates up to 1,000 IDs per click. Custom alphabet for NanoID lets you generate Crockford-friendly, digit-only PINs, or any custom charset. This tool is part of santekno's developer toolbox — a curated collection of utilities built for engineers who care about speed, privacy, and simplicity.

Common use cases

  • Debugging API payloads and integration issues
  • Inspecting tokens, hashes, or encoded strings during development
  • Generating fixtures and sample data for tests
  • Sharing readable output with teammates in code reviews

FAQ

NanoID is shorter (21 vs 36 chars) at the same collision-equivalent entropy, URL-safe without escaping, and length is configurable. Use it for user-visible IDs (share links, short codes). UUID v4 still wins when you need RFC compatibility or DB types that mandate UUID.

ULID encodes the creation timestamp in the first 48 bits, so IDs sort chronologically by string comparison — ideal for B-tree indexes, time-range queries, and pagination. UUID v4 is fully random and indexes poorly. UUID v7 is similar to ULID but uses hex; ULID uses Crockford base32 (no ambiguous chars like 0/O, I/1).

In normal mode, two ULIDs generated in the same millisecond have independent random tails — they might sort either way. Monotonic mode increments the random tail on collision, guaranteeing strictly ascending IDs within the same ms. Use it when you generate many IDs in a tight loop and need stable order.

NanoID 21 chars ≈ 149 bits — birthday collision after ~10²² IDs, equivalent to UUID v4. ULID has 80 bits of randomness per ms — within a single ms, ~1.2 × 10¹² IDs before 1% collision risk (non-monotonic). Both are safe for distributed generation.

Yes — the first 10 chars (after Crockford base32 decode) are the millisecond timestamp. This tool's decode mode does that automatically.