Snowflake ID decoder
Decode Snowflake IDs with Twitter, Discord, Mastodon and Sonyflake presets or custom bit widths: timestamp, worker and sequence fields plus a field-by-field binary view, all local.
Runs in your browserEvery computation happens in your browser — your data never leaves this device.
One ID per line, commas are also accepted; decimal positive integers only.
Decoded fields
The timestamp is epoch + ticks × ms-per-tick, and the binary view is split by field so it can be checked by hand.
Enter a Snowflake ID to decode it
What this tool does
- Recover the creation time of a record from its Snowflake ID in a database or log
- Audit a distributed ID generator: split the worker and sequence fields to check for duplicate issuing across nodes
- Use platform presets for Twitter/X, Discord, Mastodon and Sonyflake, or type your own bit widths
Example
Input
4214791
Output
id=4214791 binary=00000000000000000000000000000000000000001|0000000101|000000000111 time=2010-11-04T01:42:54.658Z ticks=1 worker=5 sequence=7
Twitter layout (41+10+12): ticks=1 with epoch 1288834974657 ms, so the timestamp is one millisecond after the epoch.
Frequently asked questions
What are the platform layouts?
Twitter/X: bit 63 is a sign bit, then 41 ms bits with epoch 2010-11-04T01:42:54.657Z, 10 worker bits and 12 sequence bits (63 effective bits). Discord: epoch 2015-01-01T00:00:00Z, 42 ms bits, 5 worker + 5 process bits and 12 sequence bits; this tool shows the 5+5 as one 10-bit field that you can split yourself. Mastodon: 48 ms bits on the Unix epoch plus 16 sequence bits and no worker field. Sonyflake: epoch 2014-09-01T00:00:00Z, 39 time bits where one tick is 10 ms, 16 machine bits and 8 sequence bits.
How is the timestamp computed?
As epoch + ticks × milliseconds-per-tick: the tool right-shifts the ID by worker + sequence bits to get the tick count, multiplies by the tick length, adds the epoch and prints UTC ISO 8601 (for example 2010-11-04T01:42:54.658Z). Sonyflake ticks are 10 ms each, so its ticks value is not a millisecond count. No clock is read, so the same input always yields the same output.
Why does an ID sometimes report that it exceeds the layout width?
Each layout has a fixed width: Twitter 63 bits, Discord 64, Mastodon 64, Sonyflake 63. If an ID is larger than the maximum value that layout can produce it did not come from that generator, so the tool reports it instead of printing a plausible but wrong timestamp. Custom layouts must also keep timestamp + worker + sequence within 64 bits.
Can it generate Snowflake IDs?
No. This tool only decodes. Generating IDs requires guaranteeing unique sequence numbers inside the same millisecond, which depends on a real clock and coordination between nodes — and this tool never reads the system clock. Use a dedicated snowflake-id generator for that.
Keywords:snowflakeTwitter snowflakeMastodon IDSonyflakeoffline