UUID · 128 bits

UUID vs ULID

Two 128-bit identifiers with different text encodings and ordering guarantees.

Key facts

Both128 bits
UUID text36 chars, hex with hyphens
ULID text26 chars, Crockford Base32
ULID ordering48-bit millisecond timestamp first
UUID orderingOnly v6/v7 are time ordered
EcosystemUUID is far more widely supported

Same size, different conventions

ULID packs a 48-bit millisecond timestamp and 80 random bits into 26 Base32 characters. It is shorter in text and sorts lexicographically, but it is not a UUID and many databases and APIs expect the UUID format. UUID v7 provides a standard time-ordered alternative with broader support.

Choosing between them

Pick UUID v7 when interoperability matters and you want time-ordered keys. Pick ULID if your stack already uses it and you value the shorter, case-insensitive string. Both expose creation time, so neither is suitable as a secret.

Frequently asked questions

Can I convert ULID to UUID?

The 128 bits can be copied, but the text encodings and semantics differ. Do not treat them as interchangeable in APIs.

Is ULID better than UUID v7?

It is shorter in text and has a clearer monotonic story. UUID v7 has wider tooling and a formal standard.

Do both sort by time?

Yes, when generated correctly. ULID always places the timestamp first; UUID only does so in v6 and v7.

New tools, straight to your inbox

One short email when we add tools worth using. No spam, unsubscribe anytime.