BLANCO
Developer · blancodagoat.dev
DECODE A DISCORD SNOWFLAKE
Every Discord ID — for a user, message, channel, guild, or role — is a snowflake: a 64-bit number that embeds the exact millisecond it was created. That means any ID tells you when the thing behind it was made. Here is the layout and the formula.
→ OPEN THE SNOWFLAKE DECODERTHE BIT LAYOUT
- Bits 63–22 (42 bits): milliseconds since the Discord epoch.
- Bits 21–17 (5 bits): internal worker ID.
- Bits 16–12 (5 bits): internal process ID.
- Bits 11–0 (12 bits): a per-process increment, reset each millisecond.
THE FORMULA
- Discord epoch =
1420070400000(2015-01-01T00:00:00Z). - Timestamp (ms) =
(snowflake >> 22) + 1420070400000. - In JavaScript, use BigInt so precision survives:
new Date(Number(BigInt(id) >> 22n) + 1420070400000)
WORKED EXAMPLE
- ID
175928847299117063 175928847299117063 >> 22= 41944705796- 41944705796 + 1420070400000 =
1462015105796ms new Date(1462015105796)→ 2016-04-30T11:18:25.796Z
FAQ
What is a Discord snowflake?
The 64-bit ID Discord assigns to every user, message, channel, guild, and role. The first 42 bits are a millisecond timestamp, then 5 bits of worker ID, 5 bits of process ID, and a 12-bit per-process increment.
How do I get the creation date from a Discord ID?
Shift the ID right by 22 bits and add the Discord epoch:
new Date(Number(BigInt(id) >> 22n) + 1420070400000). Or paste it into
the snowflake decoder.
What is the Discord epoch?
1420070400000 ms — the first second of 2015. Snowflake timestamps count from
here, not the Unix epoch.