ULID

Universally Unique Lexicographically Sortable Identifier. ULIDs combine a 48-bit millisecond timestamp with 80 bits of randomness — producing IDs that are both unique and chronologically sortable. 26 characters using Crockford's Base32 (case-insensitive). More database-friendly than UUID v4 since sorting by ULID also sorts by creation time. Available in many languages; multiple npm packages implement the spec.

Evaluated Mar 06, 2026 (0d ago) v2.x (ulid npm)
Homepage ↗ Repo ↗ Developer Tools ulid uuid sortable time-ordered id-generation database
⚙ Agent Friendliness
68
/ 100
Can an agent use this?
🔒 Security
88
/ 100
Is it safe for agents?
⚡ Reliability
84
/ 100
Does it work consistently?

Score Breakdown

⚙ Agent Friendliness

MCP Quality
--
Documentation
88
Error Messages
82
Auth Simplicity
100
Rate Limits
100

🔒 Security

TLS Enforcement
90
Auth Strength
88
Scope Granularity
88
Dep. Hygiene
88
Secret Handling
85

Uses cryptographically secure randomness. Timestamp component is publicly visible in the ID — don't use for tokens where timing should be hidden.

⚡ Reliability

Uptime/SLA
88
Version Stability
82
Breaking Changes
80
Error Recovery
85
AF Security Reliability

Best When

You need unique IDs that are chronologically sortable for use as database keys, cursor pagination, or event IDs.

Avoid When

You need random IDs without embedded timestamp (use Nano ID), or standard UUID format compliance (use uuid library).

Use Cases

  • Generate database primary keys that sort chronologically without a separate created_at column
  • Create agent-generated resource IDs where chronological ordering is important — events, messages, records
  • Use as cursor-compatible pagination IDs that are both unique and inherently ordered
  • Generate correlation IDs for distributed tracing that can be used to determine event ordering
  • Replace UUID v4 where time-sortability matters — event sourcing, message queues, audit logs

Not For

  • Security-sensitive tokens where timestamp information should not be embedded — use Nano ID or UUID v4
  • Exact timestamp extraction requirements — ULIDs embed millisecond precision; if microsecond precision matters, use UUIDv7
  • Browser environments where crypto.getRandomValues is unavailable — verify compatibility

Interface

REST API
No
GraphQL
No
gRPC
No
MCP Server
No
SDK
Yes
Webhooks
No

Authentication

Methods: none
OAuth: No Scopes: No

No authentication — local ID generation.

Pricing

Model: open_source
Free tier: Yes
Requires CC: No

Multiple open-source implementations. The 'ulid' npm package is MIT licensed.

Agent Metadata

Pagination
none
Idempotent
Full
Retry Guidance
Not documented

Known Gotchas

  • Multiple 'ulid' npm packages exist — ulid, ulidx, @std/ulid — verify you're using an actively maintained implementation; the ecosystem is fragmented
  • ULIDs generated in the same millisecond are monotonically incremented — ensure this behavior meets your sortability requirements
  • Embedded timestamp is extractable — don't use ULID as a primary key if creation time should be hidden from end users or in URIs
  • UUIDv7 is the standards-track alternative — if interoperability with UUID-based systems matters, UUIDv7 provides similar time-ordering in UUID format
  • ULID monotonic mode (same-millisecond increment) requires shared state — distributed systems generating ULIDs concurrently don't coordinate increment; multiple concurrent ULIDs in same millisecond may sort unpredictably
  • Crockford Base32 encoding means ULIDs contain only 0-9 and A-Z (excluding I, L, O, U) — case-insensitive; both uppercase and lowercase are valid when parsing

Alternatives

Full Evaluation Report

Detailed scoring breakdown, competitive positioning, security analysis, and improvement recommendations for ULID.

$99

Scores are editorial opinions as of 2026-03-06.

5212
Packages Evaluated
26151
Need Evaluation
173
Need Re-evaluation
Community Powered