ULID: Universally Unique Lexicographically Sortable Identifier

ULID vs UUIDv7: The ID war where looks meet lock-down

TLDR: ULID brings sortable, friendly IDs that can slot into existing database setups. Commenters argue UUID v7 is the newer, safer standard, sparking a looks-versus-lockdown debate that matters for performance and reliability when choosing how your data gets tagged across systems.

A new post swooned over ULID—those tidy, sortable ID tags that make databases happy—and the comment section instantly turned into a soap opera. Fans loved that ULIDs are readable, URL-friendly, and can sort nicely, which helps avoid “random IDs scattering data” and slowing writes. The demo even showed ULID playing nice with PostgreSQL and Go, slipping right into existing UUID columns. But then the UUID v7 crowd kicked down the door. One commenter opened with: “Why not use UUID7?” and the thread never recovered. Critics argued ULID looks cute but trades away cryptographic strength compared to v7; others waved the UUID v7 RFC like a badge of authority, saying standards matter more than vibes. The biggest drama bomb: a reminder that ULID’s sequential mode can collide across threads or machines—“If you want sequential, use an integer!” Cue gasps. Meanwhile, ULID loyalists cited aesthetics and simplicity, plus its spec, and dropped slick samples like “01ARZ…” versus v7’s dashed look, turning IDs into fashion statements. Memes flew: “Team Timestamp vs Team Random,” and “The most heated fight over 26 characters.” Verdict? ULID is the pretty kid with great sortability; UUID v7 is the rule-following class president promising stronger, safer vibes. The comments are split, and nobody’s leaving this cafeteria table quietly.

Key Points

  • ULID is presented as a lexicographically sortable, case-insensitive, URL-safe identifier compatible with UUID columns.
  • The article outlines UUID version limitations, especially UUID v4’s randomness causing B-tree fragmentation and reduced write performance.
  • ULID maintains 128 bits but structures them as 48 bits of timestamp and 80 bits of randomness for time ordering.
  • A Go + PostgreSQL example shows inserting both UUID v4 and ULID into a table with a UUID primary key using pgx, oklog/ulid, and google/uuid.
  • The ULID spec is available on GitHub, and its sortability is emphasized as a major advantage for database indexing.

Hottest takes

"Why not use UUID7?" — nighthawk454
"The cryptographic strength tradeoffs… seem rough" — sblom
"Sequential ID generation mode… prone to conflicts" — sedatk
Made with <3 by @siedrix and @shesho from CDMX. Powered by Forge&Hive.