decoder.tools

ULID / Snowflake ID Decoder

Extract the timestamp, shard and sequence from ULIDs and Snowflake IDs.

INPUT
OUTPUT

The result appears here as you type.

Decoding runs in your browser. What you paste is not sent to a server.

A Snowflake/ULID decoder extracts the embedded creation timestamp from a time-sortable identifier — a 64-bit Snowflake ID or a 26-character ULID — along with the worker and sequence bits that make it unique.

Example

Input
01ARZ3NDEKTSV4RRFFQ69G5FAV
Output
Type: ULID
Timestamp: 2016-07-30T23:54:10.259Z
Randomness: TSV4RRFFQ69G5FAV

What is the ULID / Snowflake ID Decoder?

Snowflake IDs were designed at Twitter to generate sortable, unique 64-bit identifiers without central coordination. The layout is 41 bits of millisecond timestamp, 10 bits of machine or worker identifier and 12 bits of per-millisecond sequence. The timestamp is an offset from a custom epoch, which is why decoding requires knowing whose Snowflake it is: Twitter's epoch is 4 November 2010, Discord's is 1 January 2015.

ULIDs solve the same problem in a text-friendly way: 26 Crockford base32 characters, of which the first 10 encode a 48-bit millisecond timestamp and the remaining 16 are randomness. They sort lexicographically in creation order, are URL-safe, and are case-insensitive by design.

Both are worth decoding for the same reason: any record keyed this way carries its own creation time, so you can date a message, an order or a log entry from its identifier alone.

How to use the ULID / Snowflake ID Decoder

  1. Paste the Snowflake ID or ULID.
  2. For a Snowflake, select the matching epoch — Twitter, Discord or custom.
  3. Read the recovered creation timestamp, worker ID and sequence.

When to use it

  • Dating a Discord message or user account from its ID.
  • Correlating log entries by extracting timestamps from record IDs.
  • Verifying that your own ID generator encodes the epoch you configured.

ULID / Snowflake ID Decoder at a glance

Snowflake64 bits: 41 timestamp · 10 worker · 12 sequence
EpochsTwitter 2010-11-04 · Discord 2015-01-01
ULID26 chars Crockford base32: 48-bit time + 80-bit random
BothLexicographically sortable by creation time

Frequently asked questions

How do I get the date from a Discord ID?

Discord IDs are Snowflakes. Shift out the low 22 bits to get the millisecond offset, then add Discord's epoch of 1 January 2015. This decoder does both steps when you select the Discord epoch.

Why does my Snowflake decode to the wrong date?

Wrong epoch. Snowflake timestamps are offsets from a service-specific starting point, so a Twitter ID decoded with Discord's epoch is off by more than four years.

What is the difference between ULID and UUID v7?

Both put a millisecond timestamp first and sort by creation time. ULID uses a 26-character Crockford base32 text form; UUID v7 keeps the standard 36-character UUID format and fits existing UUID columns.

Last reviewed · found a mistake? contact@decoder.tools · view as markdown