Skip to content

Menu

Snowflake ID Generator

Generate Twitter-style Snowflake IDs

Runs entirely in your browserGeneratorsFree, no sign-up
Loading tool

01What is Snowflake ID Generator?

Snowflake IDs are 64-bit integers that sort by creation time and can be made on many machines without a central counter. Twitter introduced the scheme in 2010, and this tool follows that original layout. There's one unused sign bit, then 41 bits of milliseconds since the Twitter epoch, 5 bits of datacenter ID, 5 bits of worker ID and a 12-bit sequence. The epoch is 1288834974657 ms, which is 2010-11-04T01:42:54.657Z. You set Datacenter and Worker, each 0 to 31, and a Count from 1 to 20, then click Generate. The math uses JavaScript BigInt, so the 19-digit results never lose precision the way a plain Number would. If two IDs land in the same millisecond, the sequence goes up by one. If it wraps past 4095, the generator spins until the next millisecond. If your clock jumps backwards between clicks, it keeps the last timestamp instead of reusing old ones. So IDs from one page session stay unique and increasing. In our own run, three IDs for datacenter 3 and worker 7 came out as consecutive numbers ending in ...656, ...657 and ...658. Decoding them showed the same millisecond with sequence 0, 1 and 2. The decoder works the other way. Paste a number into Decode Snowflake ID and it shifts out the fields. It shows the Date in ISO format, the raw Timestamp, Datacenter, Worker and Sequence. For example, 1541815603606036480 decodes to 2022-06-28T16:07:40.105Z, datacenter 11, worker 26, sequence 0. Input must be digits only and below 2^63, otherwise nothing is shown. The format allows 4096 IDs per millisecond per worker. The 41-bit clock runs out in July 2080, which is what the largest 63-bit value decodes to. There are real limits. Uniqueness only holds inside this one browser tab, because the counter lives in the page. Two tabs with the same worker pair can collide. The decoder also assumes Twitter's epoch and layout. Discord, Instagram and Sony's Sonyflake use different epochs or bit splits, so their IDs decode to wrong dates here. Generating and decoding are pure arithmetic in your browser, so the IDs you paste are never sent off for decoding.

Backend engineers prototyping time-ordered IDs for distributed databases, and anyone who wants to read the creation time hidden inside a tweet ID. The tool runs entirely in your browser, so your data never leaves your device.

02How to use Snowflake ID Generator

  1. Set Datacenter (0-31) and Worker (0-31) to match the machine you're simulating
  2. Choose a Count from 1 to 20
  3. Click Generate, then Copy All to copy the IDs one per line
  4. Paste any Twitter-style ID into Decode Snowflake ID
  5. Read the Date, Timestamp, Datacenter, Worker and Sequence boxes that appear

03Worked examples

Input: Decode 1541815603606036480
Result: Date 2022-06-28T16:07:40.105Z, Timestamp 1656432460105, Datacenter 11, Worker 26, Sequence 0
The top 41 bits are milliseconds since the Twitter epoch 1288834974657, which the tool adds back to get Unix time.
Input: Datacenter 3, Worker 7, Count 3, Generate
Result: 2125649652396486656 2125649652396486657 2125649652396486658
One real run. All three fell in the same millisecond, so only the sequence changed (0, 1, 2). Your values will differ because they depend on the clock.
Input: Decode 2125649652396486657
Result: Date 2026-11-25T17:55:44.449Z, Timestamp 1795629344449, Datacenter 3, Worker 7, Sequence 1
Decoding the second generated ID gives back the settings it was made with.
Input: Decode 20
Result: Date 2010-11-04T01:42:54.657Z, Timestamp 1288834974657, Datacenter 0, Worker 0, Sequence 20
Only sequence bits are set, so it decodes to the epoch itself.
Input: Decode 4194304
Result: Date 2010-11-04T01:42:54.658Z, Timestamp 1288834974658, Datacenter 0, Worker 0, Sequence 0
4194304 is 2^22, the lowest value that sets the timestamp field, so it is one millisecond after the epoch.
Input: Decode 9223372036854775807
Result: Date 2080-07-10T17:30:30.208Z, Timestamp 3487858230208, Datacenter 31, Worker 31, Sequence 4095
This is 2^63 - 1, the largest value the decoder accepts. It marks when the 41-bit clock runs out.

04Common use cases

  • Generating a handful of time-ordered primary keys for seed data or a schema prototype
  • Decoding a tweet or X post ID to see the exact millisecond it was created
  • Checking that an API returns 64-bit IDs as strings, by pasting a generated ID into a JSON fixture
  • Confirming that your own Snowflake service writes the datacenter and worker bits you configured
  • Showing in a design review how sequence bits keep IDs unique within one millisecond
  • Working out when a 41-bit Twitter-epoch clock overflows before you pick an ID scheme

05Tips

  • Snowflake IDs exceed Number.MAX_SAFE_INTEGER (2^53 - 1). Send them as strings in JSON, or JavaScript clients will silently round them.
  • Each running instance needs its own datacenter and worker pair. Two processes sharing a pair can produce identical IDs in the same millisecond.
  • IDs reveal when a record was created and roughly how busy a worker was. Don't use them where that leaks something sensitive.
  • A tiny number like 20 decodes to the epoch itself, because only sequence bits are set. That's a quick way to spot an ID that isn't a Snowflake.

06Related concepts

Snowflake ID, Distributed ID generation, BigInt, Unix epoch, Time-ordered identifiers, UUID.

Frequently Asked Questions

What is Snowflake ID Generator?

Snowflake ID Generator is a free, browser-based developer tool on AIDToolStack. Generate Twitter-style Snowflake IDs It requires no installation or sign-up and works entirely in your browser.

Is Snowflake ID Generator free to use?

Yes. No sign-up, no fees and no usage cap.

Does Snowflake ID Generator store my data?

No. It runs in your browser; nothing is uploaded.

Reviews and commentsShow

Reviews

Sign in to leave a review.

Loading reviews…

Comments

Sign in to leave a comment.

Loading comments…

What changed in AI dev tools, once a month

Renames, shutdowns, pricing changes and new MCP setups, each with a source.

Subscribe