Snowflake ID Calculator - Calculate & Decode Snowflake IDs
Free online Snowflake ID Calculator - Calculate & Decode Snowflake IDs tool. No signup required.
Free & instant 100% client-side No signup needed
Calculate Snowflake ID Components
Decode any snowflake ID to see timestamp, worker ID, and sequence number
DECODED COMPONENTS
TIMESTAMP (MS)
DATE & TIME
WORKER ID
SEQUENCE
Last updated
Common Calculator Use Cases
Extracting creation timestamps from IDs in API responses
Generating ID ranges for efficient time-based database queries
Comparing IDs from different sources to determine temporal order
Analyzing sequence numbers to understand system throughput
Capacity planning for new distributed systems
Verifying that generated IDs decode to expected timestamps
All calculations happen entirely in your browser. Your Snowflake IDs and analysis results are never transmitted to any server.
Discord
Epoch: January 1, 2015 (1420070400000 ms). Used for all Discord objects.
Instagram
Epoch: January 1, 1970 (0 ms). Uses Unix epoch for media IDs.
Snowflake ID Calculator Use Cases
Timestamp Extraction: Find when a tweet, Discord message, or Instagram post was created
Debugging: Verify ID generation is working correctly in your application
Data Analysis: Analyze creation patterns and timing of IDs in datasets
Forensics: Investigate when specific events occurred based on IDs
Migration: Convert IDs between different epoch systems
Validation: Verify IDs are within expected time ranges
Understanding Snowflake Components
Timestamp Component: The 41-bit timestamp allows for approximately 69 years of unique IDs from the epoch. For Twitter (2010 epoch), this extends to 2079. For Discord (2015 epoch), it extends to 2084.
Worker ID Component: The 10-bit worker ID supports up to 1,024 different servers or processes generating IDs simultaneously. This ensures IDs remain unique even when generated by multiple machines at the exact same millisecond.
Sequence Component: The 12-bit sequence allows for 4,096 unique IDs per millisecond per worker. If more IDs are needed in a single millisecond, the generator waits for the next millisecond.
Calculating Snowflake IDs Manually
To manually calculate snowflake components, you need to perform bitwise operations:
Right-shift the ID by 22 bits to get the timestamp offset
Add the platform epoch to get the actual Unix timestamp
Mask bits 12-21 to extract the worker ID
Mask bits 0-11 to extract the sequence number
Common Calculation Scenarios
Twitter Tweet Age: Calculate when a tweet was posted by decoding its tweet ID. Useful for verifying tweet timestamps and analyzing posting patterns.
Discord Message Timing: Determine exact message creation time from message IDs. Helpful for moderation and investigating incidents.
Instagram Post Date: Extract creation date from Instagram media IDs to verify post timing and analyze content schedules.
Yes, as long as you know the platform's epoch. Our calculator supports Twitter, Discord, and Instagram, but you can manually calculate IDs from any platform using snowflakes.
Why do different platforms have different epochs?
Each platform chooses an epoch close to when they started using snowflake IDs. This maximizes the time range before the 41-bit timestamp overflows (approximately 69 years from epoch).
Can I reverse calculate to create a snowflake ID?
Yes! Use our Snowflake ID Generator to create new IDs, or manually combine timestamp, worker ID, and sequence using bitwise operations.
Are snowflake calculations accurate?
Yes, calculations are accurate to the millisecond. The timestamp is directly encoded in the ID structure and cannot be altered.
What if I get a negative timestamp?
Negative timestamps indicate the ID was created before the platform's epoch, which is impossible. Double-check the ID and selected platform.
Examples
Example 1: Extract Timestamp from Snowflake ID
Input: 1529877576591609861 (Twitter)
Calculation:
Step 1: Right-shift by 22 bits
1529877576591609861 >> 22 = 364745825466
Step 2: Add Twitter epoch
364745825466 + 1288834974657 = 1653580800123 ms
Step 3: Convert to date
1653580800123 ms = 2022-05-26 18:00:00.123 UTC
Result:
Created: 2022-05-26 18:00:00.123 UTC
Unix ms: 1653580800123
Unix s: 1653580800
Example 2: Calculate ID Range for a Time Period
Find all Snowflake IDs created in January 2024 (for database queries):
Platform: Twitter
Start: 2024-01-01 00:00:00 UTC
End: 2024-02-01 00:00:00 UTC
Calculation:
Start timestamp ms: 1704067200000
Start - Twitter epoch: 1704067200000 - 1288834974657 = 415232225343
Min ID: 415232225343 << 22 = 1740000000000000000 (approx)
End timestamp ms: 1706745600000
End - Twitter epoch: 1706745600000 - 1288834974657 = 417910625343
Max ID: 417910625343 << 22 = 1751000000000000000 (approx)
Database query:
SELECT * FROM tweets
WHERE id BETWEEN 1740000000000000000 AND 1751000000000000000;
This uses the primary key index for a time-range query —
much faster than filtering by a separate timestamp column.
Example 3: Compare Two Snowflake IDs
ID 1: 1529877576591609861
ID 2: 1700000000000000000
Comparison:
ID 1 timestamp: 2022-05-26 18:00:00 UTC
ID 2 timestamp: 2023-09-14 09:26:08 UTC
ID 1 was created FIRST
Time difference: 475 days, 15 hours, 26 minutes, 8 seconds
Same datacenter? Cannot determine (different workers possible)
Same worker? No (different worker ID bits)
Frequently Asked Questions
A Snowflake ID calculator decodes 64-bit snowflake IDs to extract timestamp, worker ID, and sequence number. It converts snowflake IDs back to readable dates and shows all components of the ID structure.
Enter a snowflake ID, select the platform (Twitter, Discord, Instagram), and click Calculate. The tool extracts the timestamp (41 bits), worker ID (10 bits), and sequence number (12 bits) from the 64-bit ID.
Twitter/X, Discord, and Instagram use snowflake IDs. Each platform has a different epoch: Twitter uses November 4, 2010, Discord uses January 1, 2015, and Instagram uses Unix epoch (January 1, 1970).
Yes! Our calculator performs reverse calculation by extracting the timestamp from the ID's first 41 bits, adding the platform epoch, and converting to a readable date.