Snowflake ID Decoder
Decode a Snowflake ID into its timestamp, machine and sequence bits for X (Twitter), Discord, Instagram or your own epoch.
Free · No sign-up · Your inputs stay in your browser
Input
Decode a Snowflake ID
Output
2022-06-28T16:07:40.105Z
| Timestamp (UTC) | 2022-06-28T16:07:40.105Z |
|---|---|
| Unix ms | 1656432460105 |
| Datacenter / worker (5 + 5 bits) | 11 / 26 |
| Sequence (12 bits) | 0 |
| Binary | 00010101 01100101 10100001 00011111 01100010 00010111 10100000 00000000 |
Twitter's layout: 41 bits of milliseconds since the service's epoch, 10 bits naming the machine and 12 bits of sequence, so one machine can mint 4,096 ids a millisecond and the ids sort by time. Discord uses the same layout with its own epoch. Keep these as strings in JSON: they exceed JavaScript's 2^53 safe integers.
Runs in this browser. Nothing you paste is sent to a server.
About this tool
Method, assumptions, practical next steps, and limits.
Why services use them
Snowflakes are generated without coordination, fit in a BIGINT column and sort by time, which keeps database indexes append-only and lets an id stand in for a creation timestamp. Twitter published the design in 2010; Discord, Instagram (with its own bit layout) and many internal systems adopted variants. Discord documents its format in the developer reference.
Keep them as strings in JSON
JavaScript numbers are exact only up to 2^53, and current snowflakes are larger, so JSON.parse silently rounds them. APIs that use snowflakes send them as strings for that reason; keep them as strings, or parse with BigInt.