Skip to content
gohacks.dev
Databases

ULID Generator and Decoder

Generate ULIDs, the 26-character IDs that sort by creation time, and decode the millisecond timestamp in any ULID.

Free · No sign-up · Your inputs stay in your browser

Input

Generate and decode ULIDs

Output

Press Generate

Decoded timestamp

2026-01-01T00:00:00.000Z

1767225600000 ms since the Unix epoch

A ULID is a 48-bit millisecond timestamp and 80 random bits, written as 26 Crockford Base32 characters, so ULIDs sort by creation time as plain strings. Laravel's HasUlids trait and Str::ulid() produce the same format.

Runs in this browser. Nothing you paste is sent to a server.

Why ULIDs sort

The timestamp comes first and Crockford's alphabet keeps byte order, so ULIDs created later compare greater as plain strings. As primary keys they append to the end of a B-tree index like an auto-increment, without revealing a row count or needing a central counter. The format is defined in the ULID specification.

ULID or UUID v7?

They carry the same information: UUID v7, standardised in RFC 9562 in 2024, is also a millisecond timestamp plus randomness, written in the familiar UUID shape that databases have a native type for. Laravel supports both: HasUlids and HasUuids, whose default since Laravel 11 is ordered UUIDs.

Share

Frequently asked questions

Are ULIDs unique?
With 80 random bits per millisecond, a collision needs about 2^40 IDs generated in the same millisecond to become likely.
Does a ULID reveal when a record was created?
Yes, to the millisecond. Use a random UUID v4 where creation time must stay private.
Is what I paste sent anywhere?
No. The tool runs entirely in your browser with JavaScript. Nothing you type or paste is sent to our server or stored.

Keep planning

Similar tools