Snowflake ID Decoder
Turn a Twitter, X or Discord snowflake ID into a timestamp. Decode the worker, process and sequence bits, or build an ID for a date.
Bit breakdown
- Timestamp (bits 22–63)
- 41944705796 ms after the epoch → 2016-04-30T11:18:25.796Z
- Local time
- —
- Unix timestamp (ms)
- 1462015105796
- Worker / machine ID (bits 17–21)
- 1
- Process / datacenter ID (bits 12–16)
- 0
- Sequence (bits 0–11)
- 7
binary 0000001001110001000001100101101011000001000000100000000000000111
Blue = timestamp, green = worker, amber = process, grey = sequence.
Discord documents bits 17–21 as the worker ID and 12–16 as the process ID. Twitter’s original snowflake called bits 17–21 the datacenter ID and 12–16 the worker ID, so read the two middle numbers according to the service that issued the ID. Instagram uses a different split entirely (13 shard bits, 10 sequence bits), so only its timestamp is reliable here.
Build a snowflake for a date (for range queries)
Pick a date to generate a boundary ID.
What is the Snowflake ID Decoder?
The ByteTools Snowflake ID Decoder converts a 64-bit snowflake into the moment it was created. It shifts the ID right by 22 bits to recover the milliseconds elapsed since the service's custom epoch, adds that epoch back, and then splits out the worker or machine ID from bits 17 to 21, the process or datacenter ID from bits 12 to 16, and the 12-bit sequence counter at the bottom.
- Presets for Twitter/X, Discord, Instagram and the Unix epoch
- Any custom epoch in Unix milliseconds
- Worker, process and sequence bits decoded separately
- Colour-coded 64-bit binary showing each field
- Builds a boundary snowflake for any date, for range queries
- 100% client-side — IDs are never uploaded
How to use the Snowflake ID Decoder
- 1
Paste a snowflake ID into the box and pick the service that issued it, or choose a custom epoch and type it in milliseconds.
- 2
Read the creation time in UTC and in your local time zone, along with how long ago it was.
- 3
Check the bit breakdown for the worker, process and sequence values, and the colour-coded binary underneath.
- 4
Scroll to the builder at the bottom, pick a cut-off date, and copy the boundary snowflake for use in a range query.
About the Snowflake ID Decoder
The ByteTools Snowflake ID Decoder converts a 64-bit snowflake into the moment it was created. It shifts the ID right by 22 bits to recover the milliseconds elapsed since the service's custom epoch, adds that epoch back, and then splits out the worker or machine ID from bits 17 to 21, the process or datacenter ID from bits 12 to 16, and the 12-bit sequence counter at the bottom.
Epochs are selectable because every service picks its own: Twitter and X count from 4 November 2010, Discord from 1 January 2015, and Instagram from 24 August 2011. You can also enter a custom epoch for an in-house snowflake generator. A colour-coded binary view shows exactly which bits contributed to each number.
The tool also runs in reverse, building the smallest snowflake for a date you choose so you can write range queries against an ID column without adding a timestamp field. All of it runs 100% locally in your browser — nothing is uploaded, which matters because these IDs usually point at real messages, real accounts and real people.
Frequently asked questions
How do I get the date from a Discord snowflake?
Shift the ID right by 22 bits to get milliseconds since Discord's epoch, then add 1420070400000 to reach a normal Unix timestamp. Paste the ID here with Discord selected and the conversion is done for you, including your local time zone and a relative age.
What is a snowflake ID?
It is a 64-bit identifier that Twitter designed so many machines could mint unique, roughly time-ordered IDs without coordinating. The upper bits hold a millisecond timestamp, the middle bits identify the machine and process, and the lowest bits are a counter for IDs created in the same millisecond.
Why do I need to choose an epoch?
The timestamp inside a snowflake counts from a service-specific starting point, not from 1970. Using the wrong epoch shifts every result by years, so picking the right service matters. If you run your own generator, enter its epoch in the custom field.
Are the worker and process bits reliable?
The timestamp is dependable; the middle bits depend on the implementation. Discord documents bits 17 to 21 as the worker ID and 12 to 16 as the process ID, while Twitter's original design called the same positions the datacenter and worker IDs. Instagram uses a different split entirely, so treat only its timestamp as trustworthy.
Can I search for records created after a certain date?
Yes, and that is what the builder at the bottom is for. Pick a date and it produces the smallest snowflake that could have been created at that moment, which you can drop straight into a WHERE id >= comparison to filter by time without a timestamp column.
Related tools
UUID Decoder
Decode any UUID or GUID. Read its version and variant, and pull the creation timestamp out of version 1, 6 and 7 UUIDs instantly.
MongoDB ObjectId Decoder
Decode a MongoDB ObjectId into its timestamp, random value and counter, and build a boundary ObjectId for date-range _id queries.
Timestamp Converter
Convert timestamps to human-readable dates and dates back to timestamps. Auto-detects seconds vs milliseconds, shows local, UTC and ISO 8601 formats.
Unix Timestamp Converter
Unix epoch time converter with live current epoch, seconds, milliseconds and microseconds support, and a reference table of common epoch values.
ULID Generator
Generate ULIDs online: 128-bit, lexicographically sortable IDs with a 48-bit timestamp and 80 bits of randomness. Create up to 50 at once. Free and private.