Snowflake ID Generator & Decoder
Generate and decode 64-bit Snowflake IDs with Twitter or Discord epochs, right in your browser. Nothing you enter leaves your device.
The Snowflake ID Generator runs entirely in your browser. The IDs, timestamps, and field values you enter or decode never leave your device and nothing is uploaded to ArrayKit.
Open the ULID Generator
About Snowflake ID Generator
The Snowflake ID Generator builds 64-bit Snowflake IDs the way Twitter and Discord do: a millisecond timestamp, a worker id, a process id, and a per-millisecond sequence packed into one BigInt. Pick the Discord or Twitter epoch preset, or type your own epoch in Unix milliseconds, then set the timestamp and field values to mint an ID. Switch to Decode to paste any Snowflake and see the exact millisecond timestamp, its ISO time, and the worker, process, and sequence bits under the epoch you chose. It is handy for reverse-engineering when a Discord message was posted, reproducing an ID in a test fixture, or sanity-checking a distributed id scheme. All the bit-shifting happens on your device; the IDs and timestamps you enter are never uploaded.
Features
- Generate a 64-bit Snowflake from a timestamp, worker, process, and sequence
- One-click Discord (1420070400000) and Twitter (1288834974657) epoch presets
- Custom epoch field for any other Snowflake scheme in Unix milliseconds
- Decode mode turns any Snowflake into its timestamp, ISO time, and field bits
- "Now" button seeds the timestamp from your clock for a current-time ID
- BigInt math keeps all 64 bits exact — no precision loss on large IDs
- Clear range errors when worker, process, or sequence overflow their bits
- Runs entirely in your browser with no IDs sent to any server
How to use the Snowflake ID Generator
- Choose Discord, Twitter, or a custom epoch
- In Generate, set the timestamp and worker, process, and sequence values
- Copy the resulting 64-bit Snowflake ID
- Switch to Decode and paste a Snowflake to read back its timestamp and fields
Example
Input
175928847299117063 (Discord epoch)
Output
timestamp: 2016-04-30T11:18:25.796Z
worker: 1 process: 0 sequence: 7
Decoding a Discord Snowflake recovers when it was created and its field bits.
Common errors & troubleshooting
- The decoded timestamp is decades off (e.g. year 1970 or 2100). — You are decoding with the wrong epoch. Switch the preset to match the source — Discord vs Twitter epochs differ by years — or set the exact custom epoch.
- Generate reports 'Sequence must be between 0 and 4095.' — The sequence field is only 12 bits. Keep worker and process within 0–31 and sequence within 0–4095 so each value fits its slot.
- 'Timestamp is before the chosen epoch.' — A Snowflake stores milliseconds since its epoch, so the timestamp must be at or after the epoch. Pick a later time or a smaller epoch.
- The pasted ID looks rounded or loses its last digits. — Snowflakes exceed JavaScript's safe integer range, so treat them as strings. This tool uses BigInt, but avoid pasting an ID that some other tool already parsed as a float.
Frequently asked questions
- What is a Snowflake ID?
- A Snowflake is a 64-bit id used by Twitter and Discord that packs a millisecond timestamp, a worker (machine) id, a process id, and a per-millisecond sequence into a single sortable number, so ids are unique and roughly time-ordered without a central counter.
- How do I find when a Discord message was sent from its ID?
- Paste the message or user id into Decode with the Discord epoch selected. The tool shifts out the 42 timestamp bits, adds the Discord epoch (1420070400000 ms), and shows the exact creation time as ISO and Unix milliseconds.
- What is the difference between the Twitter and Discord epochs?
- Both layouts are the same bit widths, but they count milliseconds from different start points: Twitter uses 1288834974657 (Nov 2010) and Discord uses 1420070400000 (Jan 2015). Decoding with the wrong one shifts every timestamp by that gap.
- Why are worker and process capped at 31 and sequence at 4095?
- The layout gives 5 bits each to worker and process (2^5 − 1 = 31) and 12 bits to the sequence (2^12 − 1 = 4095). Values above those limits would overflow into the next field, so the generator rejects them.
- Can I use a custom epoch for my own service?
- Yes. Choose the Custom preset and enter your epoch in Unix milliseconds. Generate and Decode then use that value, which lets you work with any Snowflake-style scheme that keeps the 42/5/5/12 bit layout.
- Are the IDs I generate or decode sent anywhere?
- No. Every bit-shift runs in your browser with BigInt. The timestamps, ids, and field values you type or paste never leave your device and are not uploaded to ArrayKit.
Related tools
All ArrayKit tools