b2KIT

ULID Generator & Decoder

Generate Universally Unique Lexicographically Sortable Identifiers and decode timestamps from them.

Tested tool guide Tested browser tools Checked August 16, 2026

What ULID Generator & Decoder does, with a checked example

A ULID is a 26-character string that encodes a 48-bit millisecond timestamp and 80 bits of randomness, making IDs sortable by creation time while remaining compact. This tool lets you generate one with a click or paste an existing ULID to decode its timestamp into a readable UTC date and time. The surprise: the timestamp comes from the first 10 characters, and the remaining 16 are random, so two ULIDs created in the same millisecond are orderable only by their random parts, which can break strictly chronological sorting.

Worked example

A concrete input and expected output from the current implementation.

Input

01J7V1FQM3ABCDEFGHJKMNPQRS

Expected output

Timestamp: 2024-09-15 14:30:45.123 UTC

The first 10 characters, '01J7V1FQM3', decode to the Unix milliseconds value 1726410645123, which converts to that UTC time. The remaining 16 characters are ignored for the timestamp.

How the result is produced

1

Generation

The tool creates a ULID by taking the current Unix time in milliseconds, encoding it as a 48-bit number using Crockford's Base32 alphabet (0-9, A-Z excluding I, L, O, U), then appending 80 bits of cryptographically generated randomness in the same encoding. The result is always 26 characters, and each click generates a fresh random suffix.

2

Decoding

For decoding, the tool reads the first 10 characters, decodes them from Base32 back to a 48-bit number, and interprets that as milliseconds since the Unix epoch (January 1, 1970 UTC). It then formats the result as a UTC date-time string with millisecond precision. Characters after the 10th are ignored for timestamp purposes.

Good uses

  • Generating a unique ID for a database record when you want creation-time sortability without a separate timestamp column.
  • Decoding a ULID you received from another system to find out exactly when it was created, useful for debugging or auditing.
  • Testing your own code's ULID generation or comparison logic by generating and inspecting examples.

Limits and checks

  • Only the prefix determines the timestamp. Two ULIDs generated in the same millisecond have identical prefixes, so sorting them by timestamp alone is indeterminate; you must also compare the random suffix.
  • The decoded time is always UTC. If you expect local time, you must convert after decoding; the tool does not display timezone offsets.
  • The timestamp is milliseconds, not seconds. Decoding gives you that precision, and the last three digits of the Unix millisecond value are the fractional second.

Common questions

Are the generated ULIDs guaranteed to be unique?

No, but collisions are astronomically unlikely. The random part provides 80 bits of entropy, so even generating millions of ULIDs in the same millisecond, the probability of a duplicate is negligible. However, if you have a security-sensitive need for uniqueness, consider a formal UUID v4.

Can I decode a UUID with this tool?

No. A UUID is a different format (36 characters with hyphens, encoded in hexadecimal) and does not follow the ULID structure. The tool's decoder only works on valid 26-character ULIDs using the Crockford Base32 alphabet.

References and verification

The example and behavioral notes were checked against the browser implementation. Standards and primary references below define the relevant format, formula, or platform behavior.

Related Tools