Skip to content
id

ULID — Universally Unique Lexicographically Sortable Identifier

26-character Crockford Base32, monotonic, URL-safe, time-sortable identifiers for event sourcing, message streams, and distributed systems.

1 min read143 words

ULID (Universally Unique Lexicographically Sortable Identifier) is a 128-bit compatible identifier that solves UUID sortability problems. It is 26 characters long, encoded in Crockford's Base32 alphabet, and is completely case-insensitive and URL-safe.

Format Specification

  • 10 Characters (48 bits): Unix timestamp in milliseconds with support up to the year 10,889 AD.
  • 16 Characters (80 bits): Cryptographically secure random entropy.
  • Crockford's Base32: Uses 0123456789ABCDEFGHJKMNPQRSTVWXYZ, deliberately excluding I, L, O, and U to avoid visual confusion and prevent accidental profanity.

Usage

js

import { ulid } from '@readytools/id';

// Generate a new ULID using current timestamp
const id = ulid();
// Returns: "01ARZ3NDEKTSV4RRFFQ69G5FAV"

// Generate a ULID for a specific historical timestamp (in ms)
const pastId = ulid(Date.parse('2024-01-01T00:00:00Z'));
// Returns: "01HM000000..."
⚡ Live Playground

ulid()

Generating...

📏 Calculating...✨ Web Crypto Native

Monotonicity in the Same Millisecond

When generating multiple ULIDs within the exact same millisecond timestamp, @readytools/id increments the lowest random bits using Base32 carry math. This guarantees strict chronological sort order (id1 < id2 < id3) even under millions of operations per second.

Previous

NanoID & Custom NanoID

Next

CUID2 — Secure Collision-Resistant Identifiers


Top eszközök

WorkspaceLinksySEO ElemzőChromoQR kód generátor

ReadyTools

KarrierKapcsolatEszközök
Árak7 nap ingyen
TámogatásBiztonságÚtmutatókDocsBlogFrissítésekLaraVault

Nyelv kiválasztása

Téma beállítása

ReadyTools

© 2026 ReadyTools. Minden jog fenntartva.