ULID
Also known as: Universally Unique Lexicographically Sortable Identifier
A ULID (Universally Unique Lexicographically Sortable Identifier) is a 128-bit identifier encoded as 26 Crockford base32 characters that is sorted by time when generated, making it a drop-in replacement for UUID v4 with much better database insert performance.
Overview
A ULID encodes a 48-bit Unix millisecond timestamp in its first 10 characters and 80 bits of CSPRNG randomness in the last 16. The Crockford base32 alphabet deliberately omits ambiguous characters (I, L, O, U) so the result is unambiguous, case-insensitive, URL-safe, and double-click-selectable.
The key win over UUID v4 is sort order. Two ULIDs minted minutes apart sort by minted-at; two minted in the same millisecond sort within a tiny random window (the monotonic variant makes that strictly increasing). This means rows inserted close in time live close on disk, which makes B-tree index inserts dramatically faster than random UUID v4 keys.
ULIDs are not an IETF standard — the spec lives on GitHub (https://github.com/ulid/spec) — but it is widely adopted and supported across most language ecosystems.