Snowflake ID to Timestamp
Snowflake IDs hide the exact millisecond they were created. Paste a Discord user, server or message ID, an X/Twitter post ID or link, or any custom snowflake to see its creation date, worker and process IDs and sequence number, or turn a date back into the matching ID range.
Last updated:
Snowflake ID to date
Date to Snowflake
Get the smallest and largest possible ID for a moment in time, for example to page an API or filter messages before or after a date. Uses the ID format selected in the decoder.
How to use the Snowflake ID to Timestamp
- Paste an ID (for example a Discord user ID copied with Developer Mode, or a post ID from an x.com link) into the box. Links work too.
- Choose the format: Discord, X/Twitter, Instagram, Mastodon, Sonyflake or Custom. Discord and x.com links switch the format automatically.
- Read the creation time in your local time or UTC, with the worker, process and sequence fields and the bit layout below it.
- Decode several at once by pasting one ID per line; you get a table, the time between IDs and a CSV download.
- Go the other way with Date to Snowflake: pick a date to get the smallest and largest IDs created in that millisecond.
Snowflake ID formats compared
Every snowflake keeps a timestamp in its highest bits, so a larger ID always means a later creation time. What changes from system to system is the epoch (time zero) and how the remaining low bits are split.
| System | Epoch | Timestamp | Low bits | Date formula |
|---|---|---|---|---|
| Discord | 1420070400000 ms (2015-01-01 00:00:00 UTC) | 42 bits, ms | 5 worker · 5 process · 12 increment | (id >> 22) + 1420070400000 |
| X / Twitter | 1288834974657 ms (2010-11-04 01:42:54.657 UTC) | 41 bits, ms | 5 datacenter · 5 worker · 12 sequence | (id >> 22) + 1288834974657 |
| 1314220021721 ms (2011-08-24 21:07:01.721 UTC) | 41 bits, ms | 13 shard · 10 sequence | (id >> 23) + 1314220021721 | |
| Mastodon | Unix epoch (1970-01-01) | 48 bits, ms | 16 bits hash + sequence | id >> 16 |
| Sonyflake | 2014-09-01 00:00:00 UTC | 39 bits, 10 ms units | 8 sequence · 16 machine | (id >> 24) × 10 + 1409529600000 |
Worked example: decoding a Discord ID by hand
Take the ID 175928847299117063 from Discord's own documentation.
- Timestamp:
175928847299117063 >> 22 = 41944705796ms since the Discord epoch. Add 1420070400000 to get Unix time 1462015105796 ms = 2016-04-30 11:18:25.796 UTC. - Internal worker ID:
(id & 0x3E0000) >> 17 = 1. - Internal process ID:
(id & 0x1F000) >> 12 = 0. - Increment:
id & 0xFFF = 7: this was the eighth ID that process generated in that millisecond.
The same steps in code. Use 64-bit integers: JavaScript numbers lose precision above 253, so use BigInt.
| Language | Discord ID to date |
|---|---|
| JavaScript | new Date(Number((BigInt(id) >> 22n) + 1420070400000n)) |
| Python | datetime.fromtimestamp(((int(id) >> 22) + 1420070400000) / 1000, tz=timezone.utc) |
| SQL (PostgreSQL) | to_timestamp(((id >> 22) + 1420070400000) / 1000.0) |
| Excel / Sheets | Bitwise shifts are not exact on 18-digit numbers in spreadsheets; decode here and paste the Unix time instead. |
Tips
- Sorting: snowflakes sort by time, so ordering by ID is the same as ordering by creation time (to the millisecond).
- Precision loss: if an ID ends in several zeros after passing through a spreadsheet or a JSON parser, it was rounded to a 53-bit float and the low fields are no longer reliable. Keep IDs as strings.
- Timestamp limits: a 41-bit millisecond timestamp lasts about 69.7 years from its epoch (Twitter's runs out around 2080); Discord's 42 bits last about 139 years.
Frequently asked questions
How do I convert a Discord ID to a date?
Shift the ID right by 22 bits and add Discord's epoch, 1420070400000 ms (2015-01-01 00:00:00 UTC). The result is Unix time in milliseconds. For example 175928847299117063 >> 22 = 41944705796, plus the epoch gives 1462015105796 ms, which is 2016-04-30 11:18:25.796 UTC. This tool does that calculation for you.
What is a snowflake ID?
A snowflake is a 64-bit, time-sortable unique ID first designed by Twitter in 2010. The top bits store a timestamp counted from a custom epoch, and the lower bits store which machine or process generated it and a per-millisecond sequence number, so many servers can create unique IDs without coordinating.
How do I find a Discord user, server or message ID?
In Discord, turn on Settings > Advanced > Developer Mode, then right-click (or long-press) a user, server, channel or message and choose Copy ID. You can also paste a message link (discord.com/channels/server/channel/message): the tool decodes all three IDs and labels them.
What is the difference between Discord and Twitter snowflakes?
Both use 22 low bits (5 + 5 + 12) for worker/datacenter, process and sequence, but the epochs differ: Discord counts from 2015-01-01 UTC and X/Twitter from 1288834974657 ms (2010-11-04 01:42:54.657 UTC). Decoding a Discord ID with the Twitter epoch gives a date about four years too early.
Why does the decoded date look wrong or lie in the future?
The ID was probably made with a different epoch or bit layout. Open "Same ID in other formats" to see how each preset reads it, or use Custom with the epoch and bit widths from the system that created it. Also make sure you copied the full number; very short numbers decode to dates just after the epoch.
Can I get the ID for a specific date?
Yes. Date to Snowflake gives the smallest ID (all lower bits zero) and the largest ID for that millisecond. Discord's API accepts such values in before/after/around parameters, which is a common way to fetch messages from a point in time.
Is the creation time of a Discord account exact?
Yes, to the millisecond. A Discord user ID is created when the account is registered, so decoding it gives the account creation time. Server and channel IDs give their creation times, and a message ID gives the moment the message was sent.
Are all the tools on FreeToolCabin tested for quality and accuracy?
Yes! Every tool on our site undergoes automated Q/A testing in real browser environments to ensure high precision, correct output, and zero errors. If you happen to spot a bug or have a suggestion, please contact us at [email protected] and our team will review it right away.