A Discord snowflake is a 64-bit number that uniquely identifies every object on Discord — users, messages, channels, servers, roles and more. Those long 17 to 19 digit numbers aren't random: they encode the exact moment the object was created, plus a few internal counters.
What a snowflake encodes
A snowflake packs four pieces of information into a single integer:
- Timestamp — milliseconds since the Discord epoch (1 January 2015). This is why every ID is also a creation date.
- Internal worker ID — which internal machine generated the ID (5 bits).
- Internal process ID — which process on that machine (5 bits).
- Increment — a per-process counter so two IDs created in the same millisecond never collide (12 bits).
The timestamp lives in the upper 42 bits, which is why you can derive an exact creation time from any ID without asking Discord.
How to read the creation date from an ID
The math is simple: shift the ID right by 22 bits, then add the Discord epoch (1420070400000 ms).
created_at = (id >> 22) + 1420070400000
The result is a Unix timestamp in milliseconds. For example, the increment, worker and process bits sit below those 22 bits and rarely matter unless you're debugging Discord's infrastructure.
Because JavaScript loses precision above 2^53, always treat snowflakes as strings or BigInt — never as plain numbers. A naive parseInt will silently corrupt the last few digits.
Why this is useful
Knowing how to decode a snowflake helps you:
- Check exactly when an account, server or message was created — handy for spotting freshly made accounts during raids.
- Sort objects chronologically without an extra timestamp field — a larger ID is always newer.
- Debug audit logs and moderation cases where only an ID is available.
We built a Discord Snowflake Decoder that does the math for you — paste any ID and it shows the creation date, relative age and the raw worker, process and increment fields.
Snowflakes and moderation at scale
For network operators, snowflakes quietly power cross-server moderation. When CloudMod enforces a ban across an entire network, it matches on the user's snowflake — the one identifier that stays constant no matter how often someone changes their username. That's also how account-age checks during onboarding work: compare the ID's embedded timestamp against your minimum-age threshold and you can flag throwaway accounts before they ever post.