Snowflake ID Decoder
Decode a 64-bit Snowflake ID into its timestamp, machine and sequence bits, with Twitter, Discord and Instagram epochs.
โ ยท โ
- UTC
- โ
- Worker ID
- โ
- Process ID
- โ
- Increment
- โ
Raw values
- ISO 8601 (UTC)
- โ
- Unix milliseconds
- โ
- Hex (64-bit)
- โ
Date โ first snowflake
Useful for range queries: the smallest ID that could have been minted at a given instant, with every machine and sequence bit set to zero.
- Snowflake ID
- โ
How it works
A snowflake is a 64-bit ID invented at Twitter in 2010 and copied by Discord,
Instagram, Mastodon and plenty of internal systems. The top bits hold a millisecond
timestamp counted from a service-specific epoch, the middle bits identify the machine
that minted it, and the last bits are a per-millisecond counter. Decoding is pure
arithmetic: timestamp = (id >> 22) + epoch, then
(id >> 17) & 0x1F, (id >> 12) & 0x1F and
id & 0xFFF peel off the two machine fields and the sequence. This page
implements the original Twitter snowflake layout (41 timestamp bits, 5 data centre
bits, 5 worker bits, 12 sequence bits) and the identical Discord layout documented in
the Discord API reference, with the Twitter epoch 1288834974657 and the
Discord epoch 1420070400000 selectable. Instagram's variant shifts by 23
bits instead (13 shard bits and 10 sequence bits), and the custom option lets you name
any epoch and bit split.
Everything is computed in your browser with BigInt, so 64-bit IDs keep
every digit instead of being mangled by JavaScript's 53-bit floats, and nothing is
uploaded. A quick sanity check: if the decoded date lands in 1970 or far in the future,
you almost certainly picked the wrong epoch. The lower panel runs the maths backwards
and gives you the first ID mintable at a chosen instant, which is exactly what Discord's
before and after pagination parameters expect.
Frequently asked questions
What is a Snowflake ID?
A snowflake is a 64-bit identifier invented at Twitter in 2010 and adopted by Discord, Instagram and many internal systems. The top bits hold a millisecond timestamp counted from a service-specific epoch, the middle bits identify the machine that minted the ID, and the last bits are a counter that increments within the same millisecond. That makes snowflakes unique across machines without a central coordinator, and roughly sortable by time.
How do I get the date from a Discord ID?
Shift the ID right by 22 bits and add the Discord epoch, 1420070400000 (1 January 2015 UTC). Paste the ID here with the Discord preset selected and the page does it for you, showing the ISO 8601 timestamp, your local time and the worker, process and increment fields. Every Discord ID works: users, messages, channels, guilds and attachments all use the same format.
Why does my Snowflake ID decode to 1970 or to a date far in the future?
Almost always because the epoch is wrong for that ID. Twitter uses 1288834974657, Discord uses 1420070400000 and Instagram uses 1314220021721, so decoding a Discord ID with a zero epoch lands you in the 1970s. Switch the epoch picker, or choose Custom and enter the epoch your own service uses along with its machine and sequence bit widths.