ULID Generator

This ULID generator creates Universally Unique Lexicographically Sortable Identifiers in bulk and decodes the timestamp inside any ULID you paste. It also converts between ULID and UUID formats, which helps developers who store IDs in a UUID column, debug logs or check when a record was created.

Generate
IDs
Decode
UTC time
–
Unix ms
–
Local time
–
UUID form
–
ULID form
–
Random part (hex)
–

Runs entirely in your browser — nothing is uploaded. Both boxes start empty: type a count to generate, or paste an ID to decode. Randomness comes from crypto.getRandomValues.

How the ULID Generator Works

A ULID is a 128-bit identifier written as 26 characters. The first 10 characters encode the creation time in milliseconds since the Unix epoch, and the last 16 hold 80 random bits. Because the time comes first and the alphabet is in ASCII order, sorting ULIDs as plain strings also sorts them by creation time. The ULID generator reads the clock, draws random bits from your browser’s cryptographic source and encodes both in Crockford’s base32.

Formula: value = timestamp_ms × 2^80 + random_80. Each character carries 5 bits from the alphabet 0123456789ABCDEFGHJKMNPQRSTVWXYZ (no I, L, O or U), most significant first. Decoding reverses it: timestamp_ms = floor(value ÷ 2^80). The UUID form is the same 128 bits written as 32 hex digits in the 8-4-4-4-12 pattern. In monotonic mode, an ID made in the same millisecond as the previous one reuses its random part plus 1.

  • How many IDs — a whole number from 1 to 1,000; press Generate for a fresh batch.
  • Monotonic — keeps IDs from one batch in strict order even when many share a millisecond.
  • ULID or UUID to decode — paste a 26-character ULID (any case) or a 36- or 32-character UUID.
  • Results — UTC time, Unix milliseconds, your local time, the UUID form, the ULID form and the 80-bit random part in hex.

Example Scenarios

InputUTC timeUnix msUUID form
01ARZ3NDEKTSV4RRFFQ69G5FAV2016-07-30 23:54:10.259146992285025901563e3a-b5d3-d676-4c61-efb99302bd5b
01HF7YAT0000000000000000002023-11-14 22:13:20.0001700000000000018bcfe5-6800-0000-0000-000000000000
01JH5Z9QWV8K3M2N4P6R7S9T0V2025-01-09 16:45:26.811173644112681101944bf4-df9b-44c7-4154-96360f94e81b
01KDVDNA00ZZZZZZZZZZZZZZZZ2026-01-01 00:00:00.0001767225600000019b76da-a800-ffff-ffff-ffffffffffff
018bcfe5-6800-0000-0000-000000000000 (UUID in)2023-11-14 22:13:20.0001700000000000ULID form: 01HF7YAT000000000000000000

ULID Decoder and UUID Tips

ULIDs suit database keys and event logs where you want rough time order without a central counter. A few details trip people up when they adopt the ULID generator output in real systems.

  • The ULID to timestamp step reveals when a record was created. Do not use ULIDs as public IDs if creation time is sensitive.
  • Used as a ULID to UUID converter, this tool keeps every bit, but the result has no UUID version or variant bits, so strict validators may reject it. A UUID v7 is the standards-track alternative with the same time-first idea.
  • Store ULIDs as 26-character text or a 16-byte binary column; both keep the sort order.
  • Clock skew between servers can put IDs slightly out of order. Monotonic mode only guarantees order within one generator.
  • The first character can only be 0 to 7, because 26 characters hold 130 bits and only 128 are used.

The encoding, the monotonic rule and the binary layout are defined in the official ULID specification on GitHub.

ULID Generator FAQ

How do I generate ULID online without installing anything?Set how many IDs you need, from 1 to 1,000, and press Generate. The list appears instantly and can be copied or saved as a text file. Everything runs in your browser using the Web Crypto random source, so nothing is sent to a server and the IDs are never logged anywhere.
How do I make ULIDs in Python, Java or C#?Use a maintained library rather than writing your own. Common choices include the python-ulid package for Python, ulid-creator for Java and the Ulid package from Cysharp for .NET. Each produces the same 26-character format, so IDs from this ULID generator and from your code sort together.
Is a ULID better than a UUID v4?For database keys, often yes. Random UUID v4 values scatter inserts across an index, while ULIDs arrive roughly in time order, which keeps B-tree indexes compact. The trade-off is that a ULID exposes its creation time. Both have about the same collision resistance for normal workloads, with 80 or 122 random bits.
How does the ULID decoder read the time?It takes the first 10 characters, converts them from Crockford base32 to a 48-bit number and treats that as milliseconds since January 1, 1970, UTC. The local time card then shows the same instant in your device’s time zone. The result is exact to the millisecond.
Can two ULIDs ever collide?In practice it is extremely unlikely. Two IDs would need the same millisecond and the same 80 random bits, which is about one chance in 1.2 septillion for each pair made in that millisecond. Monotonic mode removes even that risk within one batch, because it increments rather than redraws.
Are ULIDs case-sensitive?No. The specification describes ULIDs as case-insensitive, and they are usually written in uppercase, so 01arz3ndektsv4rrffq69g5fav and the uppercase version are the same ID. For sorting and comparison in a database, store one consistent case, ideally uppercase, to keep string order correct.

Related Tools

For random values that do not need to sort, the random number generator for ranges and lists is quicker. When you inspect the bits inside an ID, the binary to decimal converter helps, and the time zone converter for UTC timestamps turns decoded times into any city’s clock. Keep the ULID generator handy for your next schema.

Related Calculators