Don't like ads? Go Ad-Free Today

Snowflake ID Generator (Twitter-Style)

DataDeveloperRandom
ADVERTISEMENT · REMOVE?

Generate

10-bit machine/worker identifier (0-1023)
Custom starting timestamp used when packing the ID

Or

Decode


Decoded Snowflake

ADVERTISEMENT · REMOVE?

Guide

Snowflake ID Generator (Twitter-Style)

Snowflake ID Generator (Twitter-Style)

Generate 64-bit Snowflake IDs using the classic Twitter bit-layout: a 41-bit millisecond timestamp, 10-bit machine/worker ID, and 12-bit per-millisecond sequence. Every ID is produced client-side with BigInt arithmetic, so nothing leaves your browser and bulk generation up to 1000 IDs stays collision-free for a single machine.

How to Use

  1. Set Count (1 to 1000) for how many Snowflake IDs you want.
  2. Pick a Machine ID between 0 and 1023 so IDs from different workers never collide.
  3. Choose an Epoch: Twitter (2010-11-04), Discord (2015-01-01), or plain Unix.
  4. Select an Output Format: decimal, hex, binary, JSON, or CSV.
  5. Click Generate, then copy or download the result.
  6. To decode, paste an existing Snowflake ID into the decoder to see its timestamp, machine ID, sequence, hex, and 64-bit binary breakdown.

Features

  • Bulk generation – produce up to 1000 time-sorted 64-bit IDs in one click.
  • Configurable machine ID – full 10-bit range (0-1023) for sharded deployments.
  • Multiple epochs – Twitter, Discord, and Unix epoch presets for cross-system compatibility.
  • Multiple output formats – decimal, hex, binary, JSON, or CSV.
  • Built-in decoder – reverse any Snowflake ID to timestamp, machine ID, sequence, hex, and binary components.
  • Correct sequence handling – auto-increments and waits for the next millisecond if the 4096/ms budget is exhausted.
  • Fully client-side – BigInt math, no server calls, nothing logged.

FAQ

  1. What is a Snowflake ID?

    A Snowflake ID is a 64-bit integer designed for distributed systems. Twitter introduced the format in 2010 to replace auto-increment database IDs: a custom-epoch millisecond timestamp is packed with a machine/worker ID and a per-millisecond sequence, giving sortable, collision-free IDs that can be generated without central coordination.

  2. How does the 41 + 10 + 12 bit layout work?

    The top bit is reserved as a sign bit, leaving 63 usable bits. The next 41 bits encode the number of milliseconds since a custom epoch (good for ~69 years). The following 10 bits identify the machine or worker (up to 1024 machines). The final 12 bits are a sequence counter that lets a single machine generate 4096 IDs per millisecond before needing to wait.

  3. Why do Snowflake IDs sort by time?

    Because the timestamp occupies the most significant bits of the 64-bit value, any two Snowflake IDs from the same epoch compare first by timestamp and only then by machine ID and sequence. That means alphabetical or numeric ordering of IDs is also roughly chronological, which is handy for database indexes, pagination, and log correlation.

  4. What happens if a single machine generates more than 4096 IDs in one millisecond?

    The 12-bit sequence counter overflows. A correct Snowflake implementation detects the overflow, spins until the system clock advances to the next millisecond, and then resets the sequence to zero. This tool follows that pattern so bulk generation never produces duplicate IDs on the same machine.

Want To enjoy an ad-free experience? Go Ad-Free Today

Install Our Extensions

Add IO tools to your favorite browser for instant access and faster searching

Add to Chrome Extension Add to Edge Extension Add to Firefox Extension Add to Opera Extension

Scoreboard Has Arrived!

Scoreboard is a fun way to keep track of your games, all data is stored in your browser. More features are coming soon!

ADVERTISEMENT · REMOVE?
ADVERTISEMENT · REMOVE?
ADVERTISEMENT · REMOVE?

News Corner w/ Tech Highlights

Get Involved

Help us continue providing valuable free tools

Buy me a coffee
ADVERTISEMENT · REMOVE?