Skip to main content

Snowflake ID Generator

Generate unique 64-bit Snowflake IDs (Twitter, Discord, or Unix epoch) in decimal, hex, binary, JSON, or CSV — or decode an existing Snowflake ID back into its timestamp, machine ID, and sequence.

Input

Custom starting timestamp used when packing/unpacking the ID

How many IDs to generate

10-bit machine/worker identifier (0-1023)

Output

Generated Snowflake IDs
Was this helpful?

Guides

Snowflake IDs are 64-bit, time-sortable unique identifiers first designed at Twitter and now used across distributed systems like Discord, Instagram, and countless microservices. Unlike a random UUID, a Snowflake packs a timestamp, a machine identifier, and a per-millisecond sequence number into a single number — so IDs are roughly ordered by creation time and can be generated on many machines at once without collisions. This free tool both generates new Snowflake IDs and decodes existing ones, entirely in your browser.

How Snowflake IDs are built

Every ID is a 64-bit integer split into three parts:

  • 41 timestamp bits — milliseconds elapsed since a fixed epoch (a custom "time zero"). This is what makes IDs sortable.
  • 10 machine bits — a worker/machine identifier from 0 to 1023, so different servers never clash.
  • 12 sequence bits — a counter (0-4095) that increments when more than one ID is created in the same millisecond.

The layout is (msSinceEpoch << 22) | (machineId << 12) | sequence. The only thing that differs between platforms is the epoch: Twitter uses 2010-11-04, Discord uses 2015-01-01, and the Unix option uses the standard 1970-01-01.

Generating IDs

  1. Choose Generate mode.
  2. Pick the epoch to match the platform you're emulating.
  3. Set the count (1-100) and the machine ID (0-1023).
  4. Choose an output format: decimal (one per line), hex, binary, JSON array, or CSV with all three representations.
  5. Click Generate. Each click produces a fresh batch — IDs are time-based, so re-running gives new values.

Decoding an ID

Switch to Decode mode, choose the epoch the ID was created with, and paste a decimal Snowflake ID. The tool unpacks it into its human-readable timestamp (UTC), the raw Unix time in milliseconds, the machine ID, the sequence number, and the hex and binary representations.

Why does the machine ID look different from Discord's docs?

Discord further splits its 10 machine bits into a 5-bit worker ID and a 5-bit process ID. This tool treats those 10 bits as a single combined machine field, so a Discord ID's "worker + process" appears here as one number. The timestamp, sequence, and overall value are identical either way.

Do I have to pick the right epoch?

Yes — the epoch determines how the timestamp bits are interpreted. Decoding a Twitter ID with the Discord epoch (or vice versa) yields a wrong date. Match the epoch to the source platform.

Privacy

Everything runs locally in your browser. No IDs, timestamps, or inputs are ever sent to a server.

snowflakeidunique-idtwitterdiscorddistributed-id

Love the tools? Lose the ads.

One payment clears every ad from your account, for good. No subscription, no tracking.