← All tools

Snowflake ID Decoder & Generator

Decode and generate Snowflake identifiers — the 64-bit, time-sortable IDs popularized by Twitter (X) and Discord. A Snowflake packs a 41-bit millisecond timestamp, a 10-bit machine/worker ID, and a 12-bit per-millisecond sequence into one integer, so it sorts chronologically and encodes when it was created. Paste any Snowflake (as a decimal string — these numbers exceed JavaScript's safe-integer range, so all arithmetic uses BigInt) to recover its timestamp, machine, and sequence; or generate your own with a chosen epoch. Everything runs locally in your browser.

Decode a Snowflake

Snowflake
Epoch preset

Generate a Snowflake

Timestamp (ms)
Machine ID (0–1023)
Sequence (0–4095)

Snowflake is a 64-bit ID layout: bit 63 is unused (sign, kept 0), bits 22–62 hold 41 bits of milliseconds since a custom epoch, bits 12–21 hold a 10-bit machine/worker ID, and bits 0–11 hold a 12-bit sequence that resets each millisecond. Decoding is pure bit arithmetic: timestamp = (snowflake >> 22) + epoch, machine = (snowflake >> 12) & 0x3FF, sequence = snowflake & 0xFFF. Because the timestamp sits in the most significant bits, larger Snowflakes were created later — so a plain numeric (or lexicographic, zero-padded) sort orders them in time. Twitter/X uses epoch 1288834974657 (2010-11-04); Discord uses 1420070400000 (2015-01-01). The 41-bit timestamp overflows around the year 2156 (Twitter) / 2080 (Discord). Snowflakes exceed 2⁵³, so they are handled as BigInt and read/written as decimal strings. Pairs with the ULID and UUID generators. Everything runs locally — nothing leaves your browser.