Home › Time & Date › Snowflake ID to Timestamp

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.

Advertisement
Advertisement

How to use the Snowflake ID to Timestamp

  1. 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.
  2. Choose the format: Discord, X/Twitter, Instagram, Mastodon, Sonyflake or Custom. Discord and x.com links switch the format automatically.
  3. Read the creation time in your local time or UTC, with the worker, process and sequence fields and the bit layout below it.
  4. Decode several at once by pasting one ID per line; you get a table, the time between IDs and a CSV download.
  5. 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.

SystemEpochTimestampLow bitsDate formula
Discord1420070400000 ms (2015-01-01 00:00:00 UTC)42 bits, ms5 worker · 5 process · 12 increment(id >> 22) + 1420070400000
X / Twitter1288834974657 ms (2010-11-04 01:42:54.657 UTC)41 bits, ms5 datacenter · 5 worker · 12 sequence(id >> 22) + 1288834974657
Instagram1314220021721 ms (2011-08-24 21:07:01.721 UTC)41 bits, ms13 shard · 10 sequence(id >> 23) + 1314220021721
MastodonUnix epoch (1970-01-01)48 bits, ms16 bits hash + sequenceid >> 16
Sonyflake2014-09-01 00:00:00 UTC39 bits, 10 ms units8 sequence · 16 machine(id >> 24) × 10 + 1409529600000

Worked example: decoding a Discord ID by hand

Take the ID 175928847299117063 from Discord's own documentation.

  1. Timestamp: 175928847299117063 >> 22 = 41944705796 ms since the Discord epoch. Add 1420070400000 to get Unix time 1462015105796 ms = 2016-04-30 11:18:25.796 UTC.
  2. Internal worker ID: (id & 0x3E0000) >> 17 = 1.
  3. Internal process ID: (id & 0x1F000) >> 12 = 0.
  4. 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.

LanguageDiscord ID to date
JavaScriptnew Date(Number((BigInt(id) >> 22n) + 1420070400000n))
Pythondatetime.fromtimestamp(((int(id) >> 22) + 1420070400000) / 1000, tz=timezone.utc)
SQL (PostgreSQL)to_timestamp(((id >> 22) + 1420070400000) / 1000.0)
Excel / SheetsBitwise 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.

Related tools

Unix Timestamp ConverterConvert epoch timestamps to dates and back.Discord Timestamp GeneratorMake <t:unix:R> Discord timestamp codes that show in every reader's own time zone.MongoDB ObjectId to TimestampDecode a MongoDB ObjectId to its creation date, or build ObjectIds from dates for range queries.UUID Decoder & ValidatorDecode any UUID: version, variant, v1/v6/v7 timestamp and MAC node, plus bulk validation.Military Time ConverterConvert between 12-hour and 24-hour military time.Hours Calculator (Time Card)Weekly time card with breaks, overtime, pay, print and CSV.Time CalculatorAdd, subtract, multiply and divide times in hours, minutes and seconds.Time Duration CalculatorHours, minutes and seconds between two times, overnight too.Decimal Hours ConverterConvert decimal hours to hours and minutes and back, with a payroll timesheet.Tally CounterMultiple named click counters with keyboard shortcuts and vibration.TeleprompterFree online teleprompter with smooth auto-scroll, speed in words per minute, mirror and fullscreen.Time Card CalculatorWeekly timesheet: clock in/out times and breaks to total hours, overtime and gross pay.Business Hours CalculatorCount working hours and minutes between two dates, skipping nights, weekends and holidays.Flight Arrival Time CalculatorFind your local arrival time across time zones from departure time and flight length.Golden Hour CalculatorMorning and evening golden hour and blue hour times for any location and date.When to Leave for the Airport CalculatorWhen to leave home and arrive at the airport, from your flight, bags, security and drive.Hours From Now CalculatorFind what time it will be in any number of hours from now, or what time it was hours ago.Time TrackerTrack time per task and project with start/stop timers, weekly totals, billable hours and CSV export.Wedding Day Timeline GeneratorBuild a minute-by-minute wedding day schedule from your ceremony time, printable for each vendor.5K Training Plan GeneratorRun/walk beginner, finish or time-goal 5K plans by race date, with daily sessions and paces.Baby Kick CounterCount baby's kicks with one tap, see the time to 10 movements and track your usual pattern.Knitting Row CounterCount rows with a big tap button, pattern repeats, increase reminders and saved projects.Nap CalculatorFind when to wake from a 20-minute power nap or 90-minute nap, plus the best time to nap.Stock Market Hours (Is the Market Open?)Live NYSE and Nasdaq status with countdown to the open or close, extended hours and holidays.Binge Watch CalculatorFind how long it takes to binge a TV series and the date you'll finish at your daily pace.Sehri and Iftar TimesRamadan timetable of sehri (suhoor) end and iftar times for any city, with a live countdown.Shabbat TimesCandle lighting and Havdalah times for any city and week, plus a table of upcoming Fridays.Meat Smoking Time CalculatorSmoke time for brisket, pork butt, ribs and more, with stall, rest and when to start for dinner.Telling Time GameKids' clock game: read the analog clock or set the hands, with 5 levels, stars and hints.Telling Time Worksheet GeneratorPrintable clock worksheets: read or draw the time to the hour, half, quarter, 5 or 1 minute, with answer key.Time Blocking PlannerDrag to create time blocks on a day or week grid, color them by category and compare plan vs actual.Time Clock Rounding CalculatorRound punch times to 5, 6 or 15 minutes (7-minute rule) and see rounded payable hours.Day Count Convention CalculatorDay count and year fraction for 30/360, 30E/360, Actual/360, Actual/365 and Actual/Actual.Pressure Cooker Time ConverterConvert stovetop, oven or slow cooker recipes to pressure cooker time and liquid.Sleep Regression CalculatorDates of your baby's 4, 8, 12 and 18 month sleep regressions and growth spurts.Sleep Schedule AdjusterGradually shift your bedtime and wake-up time with a day-by-day plan.
See all 34 Time Calculators →