ULID / NanoID / CUID2 Generator
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
- Pick a scheme (ULID, NanoID, CUID2).
- For NanoID/CUID2, choose ID length; for NanoID, optionally edit alphabet.
- 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.
Guides on this topic
Related tools
UUID Generator
Generate random version-4 UUIDs in bulk, with copy.
ULID Decoder (Timestamp & Randomness)
Decode a ULID into its 48-bit creation timestamp and 80-bit randomness — Crockford Base32, case-insensitive, with the time as ISO UTC, relative, and epoch milliseconds — entirely in your browser.
Snowflake ID Decoder (Discord, Twitter)
Decode a Discord, Twitter/X, or Instagram Snowflake ID into its creation timestamp, worker/process or datacenter, and sequence — with a custom-epoch mode — entirely in your browser.
Hash Generator (SHA)
Generate SHA-1, SHA-256, SHA-384, and SHA-512 hashes from text.
JSON → TypeScript Interface
Generate TypeScript interfaces from any JSON sample — types are inferred recursively and named after each key.
JSON to JSDoc @typedef Generator
Turn a JSON object into JSDoc @typedef blocks with @property tags, in your browser.