AZ Tools

ULID / NanoID / CUID2 Generator

Developer

Three modern ID schemes for distributed systems. **ULID** is 26 chars, lexicographically sortable by time, encodes ms timestamp + 80 random bits. **NanoID** is a customizable-alphabet random ID — same security as UUIDv4 but shorter and URL-safe. **CUID2** is collision-resistant, fingerprint-free, secure by default. All are generated with `crypto.getRandomValues` and rejection sampling for uniform distribution.

About

ULID: 26 chars · 48-bit timestamp + 80-bit random · Crockford Base32 · sortable by time.

How to use

  1. Pick a scheme (ULID, NanoID, CUID2).
  2. For NanoID/CUID2, choose ID length; for NanoID, optionally edit alphabet.
  3. Set count and generate. Copy individual IDs or all at once.

Frequently asked questions

ULID vs UUIDv4?
Both are 128 bits of randomness, but ULID's first 48 bits encode the timestamp — IDs generated later sort after earlier ones, useful for DB primary keys.
Why NanoID instead of UUID?
Shorter (21 chars vs 36), URL-safe by default, and the alphabet is configurable. Same crypto strength as UUIDv4 at default size.
Is CUID2 secure?
Yes — uses crypto-secure RNG and a configurable length. Designed specifically to be hard to guess (no embedded timestamp or fingerprint to leak).
Are these RFC-compliant?
ULID has a community spec. NanoID and CUID2 are de-facto standards with reference implementations. None are RFC-numbered like UUID.

Related tools