Get the latest tech news

ULID: Like UUID but Sortable (2019)


The canonical spec for ulid. Contribute to ulid/spec development by creating an account on GitHub.

It isn't the most character efficient way of encoding 128 bits of randomness UUID v1/v2 is impractical in many environments, as it requires access to a unique, stable MAC address UUID v3/v5 requires a unique seed and produces randomly distributed IDs, which can cause fragmentation in many data structures UUID v4 provides no other information than randomness which can cause fragmentation in many data structures 48 bit integer UNIX-time in milliseconds Won't run out of space 'til the year 10889 AD. Any attempt to decode or encode a ULID larger than this should be rejected by all implementations, to prevent overflow bugs.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of UUID

UUID

Photo of ULID

ULID

Related news:

News photo

PostgreSQL and UUID as Primary Key

News photo

Now that UUIDv7 is lexicographic, does that mean there is no use for ULID?

News photo

New UUID formats have been approved