Discord Unix Timestamp from a Message ID
Answer: A Discord message ID is a Snowflake, not Unix seconds. To find the UTC instant encoded in that ID, treat the ID as an exact integer, shift it right by 22 bits, and add Discord's epoch 1420070400000. That result is Unix milliseconds; divide by 1000 and floor it for a Discord <t:SECONDS:STYLE> code. Paste an ID below to see the calculation.
The example is a synthetic Snowflake constructed for the worked instant; it is not an actual Discord message.
Timestamp code: —
Calculation runs in your browser. The derived instant comes from the ID's timestamp field; this page does not fetch the message or verify its displayed send time.
Can every message ID reveal a time?
A user-supplied Reddit discussion lead asked about a timestamp for every message. Discord's official Snowflake reference specifies a timestamp field for its IDs, including message IDs, while warning that API IDs are returned as strings to avoid integer overflow. If you have a genuine Discord message ID, you can decode its embedded creation instant. A made-up number may still produce a date, so a plausible result alone does not authenticate an ID or prove a message exists.
Worked example: build and decode one ID
Start with 2026-10-08T12:00:00Z, or 1791460800000 Unix milliseconds. Subtract Discord's documented epoch 1420070400000 and shift left by 22 bits, giving 1557724240281600000. This is the base ID for that instant with the lower worker, process, and increment bits set to zero, so it is a mathematical example, not a real message ID. Reverse the operation: (1557724240281600000 >> 22) + 1420070400000 = 1791460800000 milliseconds. Then floor(1791460800000 / 1000) = 1791460800 seconds, giving <t:1791460800:F>.
const id = BigInt("1557724240281600000");
const unixMs = (id >> 22n) + 1420070400000n;
const unixSeconds = unixMs / 1000n;
const code = `<t:${unixSeconds}:F>`;
Use BigInt or a precise integer type. JavaScript Number cannot exactly represent many full-length Snowflake IDs; converting the ID through Number first may discard low bits. Discord's API likewise serializes IDs as strings.
Is this the same as a timestamp code?
No. A Snowflake is an object identifier containing a millisecond timestamp field. Message markup <t:UNIX_SECONDS:F> contains a plain Unix-second value that Discord displays in the viewer's timezone. Pasting the Snowflake itself into the markup will not represent the intended event. Our seconds-versus-milliseconds guide explains the unit separately; the reverse converter reads an existing markup code, not a message ID.
What should I check before using the result?
Confirm that you copied the complete ID, compare the decoded UTC instant with the message you meant, and remember that the browser-local line uses your device's timezone. For an event at a different planned time, use the generator; the message ID identifies its own encoded creation instant, not an arbitrary future event.
Sources and method
The bit layout, epoch, and string-handling rule come from Discord's Snowflakes reference. The message-formatting reference supplies the Unix-seconds markup rule. The user-provided community question was a topic lead, not the technical source. We calculated the synthetic example independently and tested the calculator with exact integers and invalid input.