π₯ Parse a ULID
About ULID
- ULID = Universally Unique Lexicographically Sortable Identifier (specification at github.com/ulid/spec)
- 26 characters using Crockford Base32 (excludes I, L, O, U to avoid confusion)
- Format:
TTTTTTTTTT RRRRRRRRRRRRRRRR= 10-char timestamp (ms since epoch) + 16-char random - Sortable: lexical order = chronological order (great for database indexes)
- 128 bits like UUID, same uniqueness guarantee
Why ULID over UUID v4
- Sortable by time β natural insertion order in database indexes (no random scattering)
- URL-safe β no hyphens, shorter (26 vs 36 chars)
- Case insensitive β easier to read aloud or type
- Used in modern systems: Vercel, Stripe, dating apps, distributed systems