Skip to content

ULID Generator with Timestamp Decoder

Make ULIDs for the current time or any time you choose, and paste a ULID to read the date hidden in its first ten characters. Output is for testing and examples.

Runs in your browserFree, no sign-upLast reviewed

Settings

Unix seconds, milliseconds or an ISO date (read as UTC). Starts at the current time.

Paste any ULID to read its timestamp and UUID form.

Fill in the settings to see your result here.

Your result appears here instantly — nothing is uploaded.

Quick answers

What is a ULID?
A Universally Unique Lexicographically Sortable Identifier: 128 bits, made of a 48-bit Unix timestamp in milliseconds followed by 80 random bits, written as 26 Crockford base32 characters such as 01ARZ3NDEKTSV4RRFFQ69G5FAV. Sorting ULIDs as plain text sorts them by creation time.
How do I get the timestamp from a ULID?
Decode the first 10 characters from Crockford base32 into a number: that is the Unix time in milliseconds. For 01ARZ3NDEKTSV4RRFFQ69G5FAV the result is 1469922850259, which is 2016-07-30T23:54:10.259Z. Paste any ULID into the decode field to do this automatically.
How long is a ULID?
Always 26 characters, with no hyphens. The first 10 are the timestamp and the last 16 are the random part. A UUID holding the same 128 bits takes 36 characters with hyphens or 32 without.
Which characters can a ULID contain?
The 32 characters of Crockford base32: the digits 0 to 9 and the letters A to Z without I, L, O and U. The first character is always 0 to 7, because 26 base32 characters could hold 130 bits and a ULID uses 128.
Can I convert a ULID to a UUID?
Yes. Both are 128 bits, so a ULID can be rewritten as 32 hex digits in the 8-4-4-4-12 layout. 01ARZ3NDEKTSV4RRFFQ69G5FAV becomes 01563e3a-b5d3-d676-4c61-efb99302bd5b. The result fits a UUID column, but its version digits are arbitrary, so strict UUID validators may reject it.
Are ULIDs from an online generator safe to use in production?
Not from this one. Its random part comes from a seeded pseudo-random generator, so the output is well-formed but predictable. Use it for tests, seed data and examples, and create real IDs in your own code with a ULID library that uses a cryptographically secure random source.

What ULID Generator does

A ULID is a 128-bit identifier written as 26 characters: 10 that encode a millisecond timestamp and 16 that encode 80 random bits. This page builds them for the time in the Timestamp field, which starts at the current time and accepts Unix seconds, milliseconds or an ISO date, so you can produce IDs that look as if they were created last year or next month. It makes up to 100 at once, with optional monotonic ordering. Paste any ULID into the decode field and you get its creation time in UTC, Unix seconds and milliseconds, and the same 128 bits written as a UUID string. One caveat up front: the random part here is pseudo-random, so use these for fixtures and documentation, not as live IDs.

ULID format: what each of the 26 characters holds

Layout of 01ARZ3NDEKTSV4RRFFQ69G5FAV, the example used in the ULID specification.

PartCharactersBitsExampleMeaning
Timestamp1 to 104801ARZ3NDEKUnix time in milliseconds: 1469922850259
Randomness11 to 2680TSV4RRFFQ69G5FAVRandom bits, new for each ID
Whole ULID2612801ARZ3NDEKTSV4RRFFQ69G5FAVSorts by time as plain text

80 random bits give 2 to the power 80, about 1.21 x 10^24, possible values within a single millisecond.

ULID timestamp prefixes for common dates

The first 10 characters produced by this tool for each time (UTC). Any ULID created at that millisecond starts with this prefix, which makes these handy as range bounds in a query.

Date and time (UTC)Unix millisecondsTimestamp part
1970-01-01 00:00:0000000000000
2000-01-01 00:00:0094668480000000VHNCZB00
2020-01-01 00:00:00157783680000001DXF6DT00
2023-11-14 22:13:20170000000000001HF7YAT00
2025-01-01 00:00:00173568960000001JGFJJZ00
2026-01-01 00:00:00176722560000001KDVDNA00
2026-10-13 09:30:00179188380000001M4T9HVE0
2030-01-01 00:00:00189345600000001Q3DCBD00
2100-01-01 00:00:00410244480000003QCPC7P00
Largest possible (year 10889)2814749767106557ZZZZZZZZZ

Example runs: generating and decoding

Real output from this tool. The generated values use its fixed starting seed, so your own batches will have different random parts.

One ULID for a Unix time in seconds

Timestamp: 1791883800, How many: 1

01M4T9HVE0Z9FTGB2RZTEYWZM7 (time 2026-10-13T09:30:00.000Z)

A value in seconds is multiplied by 1,000, so the millisecond digits are 000.

The same instant with milliseconds

Timestamp: 2026-10-13 09:30:00.123

Timestamp part 01M4T9HVHV (1791883800123 ms)

Only the last two characters of the timestamp part changed: nearby times share a long prefix.

A monotonic batch of three

Timestamp: 1791883800, How many: 3, Monotonic: on

01M4T9HVE0Z9FTGB2RZTEYWZM7, 01M4T9HVE0Z9FTGB2RZTEYWZM8, 01M4T9HVE0Z9FTGB2RZTEYWZM9

The last character steps through 7, 8, 9: each ID is the one before plus 1.

Decoding the specification's example

ULID to decode: 01ARZ3NDEKTSV4RRFFQ69G5FAV

2016-07-30T23:54:10.259Z, Unix milliseconds 1469922850259, UUID form 01563e3a-b5d3-d676-4c61-efb99302bd5b

Decoding a hand-typed ULID with look-alike letters

ULID to decode: o1arz3ndektsv4rrffq69g5fav

Read as 01ARZ3NDEKTSV4RRFFQ69G5FAV, same time as above, with a note that it was normalised

Crockford base32 treats O as 0 and I or L as 1, and ignores case.

ULID vs UUID v4 vs UUID v7

PropertyULIDUUID v4UUID v7
Size128 bits128 bits128 bits
Text length26 characters36 with hyphens36 with hyphens
EncodingCrockford base32HexadecimalHexadecimal
Timestamp48-bit Unix millisecondsNone48-bit Unix milliseconds
Random bits8012274
Sorts by creation timeYesNoYes
Defined byThe ulid/spec repository on GitHubRFC 9562 (formerly RFC 4122)RFC 9562
Reveals when it was createdYesNoYes

UUID v7 gives the same time-ordered behaviour inside the standard UUID format, so it fits native UUID column types. ULID is shorter as text and has no hyphens, which suits URLs and file names.

What monotonic mode does and when it matters

Two ULIDs created in the same millisecond share their first 10 characters, so their order is decided by the random part and is arbitrary. The specification's answer is monotonic generation: when a new ID is requested within the same millisecond as the last one, take the previous random part and add 1 instead of drawing a fresh one. The IDs then sort in exactly the order they were issued.

Every ULID in a batch from this page has the same timestamp, so the Monotonic box decides how the batch looks. Off, each ID gets its own random part and the list is in no particular order. On, the first ID is random and the rest count up from it, which is what a library's monotonic factory would produce in a tight loop. The trade-off is predictability: once you have seen one monotonic ULID, the next one in that millisecond is easy to guess.

Limits of this tool

  • The random part is pseudo-random and not suitable for anything that must be unguessable or globally unique. Collisions with other people's batches are possible in a way they are not with a secure generator.
  • All ULIDs in one batch share one timestamp. The tool does not spread a batch over a time range.
  • A timestamp entered in seconds has no millisecond detail. Enter milliseconds or an ISO date with a fraction if you need it.
  • ISO dates without a time zone are read as UTC, and decoded times are shown in UTC only.
  • Decoding goes from ULID to UUID form. It does not convert a UUID into a ULID, and it does not check whether a decoded time is plausible.
  • Times before 1970 and after the year 10889 cannot be represented in 48 bits and are rejected.

Using ULID Generator

  1. 1

    Leave Timestamp at the current time, or replace it with Unix seconds, Unix milliseconds or an ISO date such as 2026-10-13T09:30:00Z.

  2. 2

    Set How many to any number from 1 to 100.

  3. 3

    Tick Lowercase if your system stores them that way, and Monotonic if each ULID in the batch should be the previous one plus 1.

  4. 4

    Press Generate, then copy the list or download it as ulids.txt. Each press gives a different random part.

  5. 5

    To read an existing ID, paste it into ULID to decode and press Generate: the decoded time and UUID form appear under the batch.

Questions people ask

Why does every ULID in my batch start with the same characters?
The first 10 characters are the timestamp, and a batch is generated for a single millisecond. ULIDs made close together in real systems also share a long prefix, because only the last characters of the timestamp part change from one second to the next.
Does a ULID reveal when a record was created?
Yes, to the millisecond, to anyone who sees the ID. That is convenient for debugging and sorting, and a reason not to expose ULIDs publicly if creation time is sensitive, for example on user accounts or orders.
Is a ULID case-sensitive?
No. The canonical form is upper case, and the specification describes ULIDs as case insensitive. Lower-case output is offered here because some databases and URL schemes normalise to it. Compare ULIDs case-insensitively or store one case only.
Why are the letters I, L, O and U missing?
Crockford base32 leaves out I, L and O because they are easily confused with 1 and 0 when read or typed, and U to reduce the chance of accidental obscenities. A decoder may accept I and L as 1 and O as 0, as this one does.
Can I generate a ULID for a past or future date?
Yes. Type the date into Timestamp, for example 2025-01-01 or 2025-01-01T08:15:00Z, and the batch is stamped with that time. This is the usual way to build fixtures that must sort before or after existing records.
Is the output the same every time?
No. Each press of Generate picks a new seed in your browser, so the random parts change. The timestamp part stays the same for as long as the Timestamp field does. Nothing you generate or decode is sent to a server.
Should I use ULID or UUID as a database primary key?
Time-ordered IDs such as ULID and UUID v7 insert at the end of a B-tree index, which avoids the page splits that fully random UUID v4 keys cause on write-heavy tables. Pick UUID v7 if you want a native UUID column type and ULID if you value the shorter text form.
What is the largest valid ULID?
7ZZZZZZZZZZZZZZZZZZZZZZZZZ, which is all 128 bits set. Its timestamp part, 7ZZZZZZZZZ, is 281474976710655 milliseconds, a date in the year 10889. Anything starting with 8 or higher does not fit in 128 bits and is rejected by the decoder.

Looking for something else? Browse all developer tools or see every tool.