Developer Tools
Snowflake ID Decoder
Decode 64-bit snowflake IDs from Discord, Twitter or X, and Instagram. Extract the timestamp, worker, shard, and sequence fields in your browser.
Snowflake ID decoder
Platform
Discord uses the same layout for every snowflake on the platform (users, guilds, channels, messages, roles, emojis, webhooks). 42 timestamp bits, 5 worker bits, 5 process bits, 12 increment bits, base epoch 2015-01-01 UTC.
Paste one snowflake ID to see the embedded timestamp and field breakdown.
Accepts plain decimal digits, hex prefixed with 0x, or values wrapped in {} or quotes. Snowflakes are unsigned 64-bit integers.
Decoded timestamp
2024-04-29T18:12:02.167Z
2 years ago
Details
- Decimal
- 1234567890123456789
- Hex
- 0x112210f47de98115
- Unix ms
- 1714414322167
- ISO UTC
- 2024-04-29T18:12:02.167Z
- Worker ID (5b)
- 20
- Process ID (5b)
- 24
- Increment (12b)
- 277
64-bit layout
What is a snowflake ID?
A snowflake is a single 64-bit unsigned integer that encodes the time a record was created plus a few smaller fields that identify the machine and the sequence number on that machine. The high bits hold a millisecond timestamp counted from a published epoch (not the Unix epoch). The low bits hold the worker, process, datacenter, shard, or sequence numbers, depending on the platform. Because the timestamp lives in the high bits, two IDs created near each other in time are also near each other numerically, which makes snowflakes a popular alternative to UUIDs for time-ordered primary keys.
Decoding rules used here
- Input is parsed as an unsigned 64-bit integer using BigInt. Decimal digits, hex with a 0x prefix, surrounding quotes, and {} wrappers are all accepted.
- The lower field bits are masked off, right to left, in the published field order for each platform.
- The remaining high bits are the millisecond delta from the platform epoch. Add the epoch to get the Unix millisecond value.
- The resulting Date is shown in ISO 8601 UTC plus a relative description (such as 3 years ago).
- All math runs locally in BigInt; the IDs you paste here never leave your browser.
Platform reference
| Platform | Epoch (UTC) | Timestamp bits | Field layout |
|---|---|---|---|
| Discord | 2015-01-01T00:00:00.000Z | 42 | 5-bit worker id + 5-bit process id + 12-bit increment |
| Twitter / X | 2010-11-04T01:42:54.657Z | 41 | 5-bit datacenter id + 5-bit worker id + 12-bit sequence |
| 2011-08-24T21:07:01.721Z | 41 | 13-bit logical shard + 10-bit auto-increment |
First Discord snowflake (id = 4194304) corresponds to 2015-01-01T00:00:00.001Z. Twitter snowflakes started rolling out in late 2010; the published custom epoch is 2010-11-04T01:42:54.657Z. Instagram's snowflake epoch is 2011-09-09T01:07:01.721Z, the moment they cut over from the old MySQL auto-increment scheme.
How to use
- Pick a platform: Discord, Twitter or X, or Instagram. Use Custom if you need a different epoch or bit layout.
- Choose a mode at the top: Single ID for one decode, Batch to decode a pasted list, or Build from date to invert the process.
- Paste a snowflake ID, paste a list of IDs (one per line), or pick a date depending on the mode. Decoding runs on every keystroke.
- Read the timestamp, decimal and hex forms, and the per-field values in the result panel. Use the copy buttons to lift any value, or Copy results as CSV in batch mode.
- For Custom layouts, set the Unix-millisecond epoch and the bit widths so the high field plus the low field plus the timestamp bits sum to 64 (or 63 if you reserve the sign bit).
About this tool
Snowflake ID Decoder parses any 64-bit snowflake-style identifier and shows the embedded timestamp, the worker and process or datacenter fields, and the per-machine sequence number. Built-in presets cover the three most-searched layouts: Discord (42-bit timestamp, 5-bit worker, 5-bit process, 12-bit increment, epoch 2015-01-01 UTC), Twitter or X (41-bit timestamp, 5-bit datacenter, 5-bit worker, 12-bit sequence, epoch 2010-11-04 01:42:54.657 UTC), and Instagram (41-bit timestamp, 13-bit logical shard, 10-bit auto-increment, epoch 2011-09-09 01:07:01.721 UTC). A Custom mode exposes the underlying parameters, so any Twitter-derived scheme (Sony, Yelp, Mastodon's status IDs, Sonyflake, internal company variants) decodes correctly once you set the epoch and the bit widths. The parser accepts plain decimal digits as they appear in a URL or API response, hex with a 0x prefix, values wrapped in curly braces or quotes, and even underscored digit groups, and runs the entire decode in BigInt so the full 64 bits stay exact (JavaScript's regular Number type loses precision above 2 to the 53rd). For each decoded ID the panel reports the canonical decimal and hex forms, the Unix millisecond value, the ISO 8601 UTC timestamp, a relative description (such as 3 years ago), every field decoded under the chosen layout, and a colour-coded 64-bit binary layout so you can see exactly which slice of bits became which field. A Batch mode decodes a pasted list of IDs at once, counts how many parsed successfully, and exports the timestamps as CSV ready to drop into a spreadsheet or a query. The inverse Build mode goes the other way: pick a calendar date and the tool returns a representative snowflake at that moment with the lower fields zeroed, which is the standard recipe for the discord.py before_id and after_id message-history filters, the Twitter API since_id and max_id parameters, and any other API that expects a snowflake instead of a date. The two explainer panels lay out the 64-bit layout, the difference between platform epochs and the Unix epoch, and the reason snowflakes are time-sortable while UUIDs (v4) are not. Everything runs locally on your device; the IDs you paste here never leave your browser.
Free to use. Works in your browser. No signup, no login.
Related tools
You may also like
UUID Validator
Validate UUIDs, identify the version and variant, and decode v1, v6, and v7 timestamps.
Open tool
GeneratorUUID v7 Generator
Time-ordered UUID v7 generator and version-aware UUID decoder.
Open tool
Date & TimeDiscord Timestamp Generator
Build Discord <t:UNIX:STYLE> tokens with live, locale-aware previews.
Open tool
Date & TimeUnix Timestamp Converter
Convert epoch timestamps to dates and back.
Open tool
GeneratorULID Generator
Generate sortable ULID identifiers and decode any ULID back into its timestamp.
Open tool