IDs & time

Snowflake ID decoder

Choose a layout before interpreting an ID.

Snowflake ID decoder

Decimal Snowflake ID

Result report

All ID calculations run in your browser; inputs are not uploaded.

Options

One decimal ID; up to 256 characters. No URLs or lists.

Twitter snowflake-2010: 41/5/5/12, high node = datacenter, low = worker; reserved sign bit is 0. View source

Enter an ID or load an example.

The Snowflake ID decoder helps when a log contains an identifier but no separate creation date. Start with the scheme used by the originating system: the same digits can describe different dates under different epochs. A plausible timestamp alone cannot tell you which platform issued the number.

Why use this Snowflake ID decoder?

Keep the platform assumptions visible

This Snowflake ID decoder separates the original Twitter layout from Discord: 41 versus 42 timestamp bits, plus different names for the two node subfields. The selected preset shows its epoch and source, so you can check the interpretation before using it in an incident timeline.

An identifier separated into time, two node subfields and a sequence, with a clock connected to the time field.

Reproduce a case down to the last bit

An exact timestamp, node and sequence can recreate the same test identifier. Compare the grouped binary fields with your application’s bit masks, or move a boundary in the custom layout to see which field receives those bits. This is useful for debugging a packing error without changing production records.

Two continuous bit layouts with different boundaries between time, node and sequence fields.

Check the assumptions first

01

Identify the issuing scheme

Choose Twitter original only for that archived layout, or Discord for its documented unsigned format. Custom mode keeps your own epoch and widths; switching a preset never silently infers the origin from the digits.

02

Check the units and node split

Epoch and generation time use Unix milliseconds. For the presets, the combined node equals high × 32 + low. Twitter calls those halves datacenter and worker; Discord calls them worker and process.

03

Freeze the result before exporting

Automatic decoding waits 350 ms after an edit. Turn it off for manual runs with Ctrl/Cmd + Enter. Changed inputs disable exports until the next successful run; generating a test ID always requires an explicit action.

From integer to individual fields

Exact decimal input

The Snowflake timestamp decoder reads the original decimal string into BigInt. ID 175928847299117063 with Discord yields 2016-04-30T11:18:25.796Z, node 32 and sequence 7. Adjacent IDs retain different low bits even when a floating-point number would round them together.

Inspect each field

Read UTC, Unix milliseconds, the elapsed time from the epoch, node and sequence together. A grouped binary view preserves leading zero bits. Twitter also displays its reserved zero sign bit; Discord uses all 64 bits.

Tune a continuous layout

Custom mode configures time, node and sequence widths in that order from high to low. Node or sequence can have zero bits, in which case their only valid value is zero. You can test a different allocation without pretending it is a named platform.

Build a reproducible fixture

The Snowflake ID generator combines a time, node and sequence into one value and immediately decodes it for inspection. Leave time blank to use the clock at the moment you run it, or specify milliseconds for a repeatable fixture. Copy the ID or download the complete JSON report.

What the result can and cannot prove

No automatic platform detection
The ID contains no epoch label. A Discord ID to timestamp conversion using Twitter’s epoch can produce a plausible but wrong date. Presets describe a layout, and never certify where the ID came from.
Milliseconds and at most 64 bits
Only contiguous timestamp → node → sequence fields are supported. Time requires at least one bit and the sum cannot exceed 64. Seconds, microseconds, scattered bit offsets and other encoding schemes need a different decoder.
One decimal value at a time
Accepts a single unsigned decimal ID, surrounding whitespace and leading zeros. Negative IDs, URLs, hexadecimal, decimal fractions, scientific notation and multiple values are rejected. Each numeric input is capped at 256 characters; exported integers remain strings.
Test encoding does not allocate unique IDs
Identical parameters generate identical IDs. There is no worker registry, persistent counter or clock rollback coordination. Future dates and zero are valid test inputs when they fit the layout; they do not demonstrate a real object exists.
No account or post lookup
Bit fields do not reveal a username, message body or geographic location. The tool performs arithmetic and does not verify an object through an API. Dates outside the supported Date range fail explicitly rather than being clipped.

Snowflake ID decoder FAQ

How can I get the creation time from a Discord ID?

Select Discord and enter the unmodified ID string. The Snowflake ID decoder shifts off the 22 low bits and adds 1420070400000 milliseconds. The report gives the resulting UTC instant; this describes the encoded time, not an independent check of a message.

Why use BigInt for this calculation?

A JavaScript Number cannot represent every integer above 2^53 − 1. Reading an ID as BigInt avoids that rounding. If a spreadsheet or earlier JSON parser has already changed its last digits, return to the original string: no decoder can reconstruct the lost digits.

How do the Twitter and Discord epochs differ?

Twitter’s archived snowflake-2010 layout starts at 1288834974657 ms, while Discord starts at 1420070400000 ms. Their timestamp widths also differ: 41 and 42 bits respectively. Changing only the epoch misses that format difference.

Why do the subfields stop at 31 and the sequence at 4095?

Each preset node half has 5 bits, allowing 0–31; together the node has 10 bits, allowing 0–1023. A 12-bit sequence holds 0–4095. The generator rejects larger values so one field cannot spill into its neighbor.

Can I supply an epoch for my own service?

Yes. Choose Custom, enter its signed Unix millisecond epoch and set all three widths. You must know both the epoch and layout from that service. The generated time must be at or after the epoch and fit the configured timestamp field.

Have a layout question?

Check your next ID

The Snowflake ID decoder is ready for a real ID string or a controlled test case. Match the source layout, inspect the fields and keep the report with your debugging notes.