⏱️ Snowflake ID to Timestamp Converter

Convert snowflake IDs to Unix timestamps in milliseconds

🔍 Convert Snowflake ID to Unix Timestamp

Select platform and enter snowflake ID to extract Unix timestamp

📝 Try an example:
Unix Timestamp (milliseconds)
Unix Timestamp (seconds)
Human-Readable Date
ISO 8601 Format

How to Convert Snowflake ID to Unix Timestamp

Converting a snowflake ID to a Unix timestamp is straightforward: select the platform (Twitter, Discord, or Instagram), paste the snowflake ID, and click Convert. Our tool instantly extracts the embedded timestamp and displays it in milliseconds, seconds, and human-readable format.

Snowflake IDs encode timestamps in the first 41 bits. The conversion formula is: (snowflake_id >> 22) + platform_epoch. This right-shifts the ID by 22 bits to extract the timestamp offset, then adds the platform's epoch to get the Unix timestamp.

Why Convert Snowflake ID to Timestamp?

Platform Comparison Table

Platform Epoch Date Epoch (ms) Example ID Formula
🐦 Twitter/X Nov 4, 2010 1288834974657 1382350606417817604 (id >> 22) + 1288834974657
💬 Discord Jan 1, 2015 1420070400000 175928847299117063 (id >> 22) + 1420070400000
📸 Instagram Jan 1, 1970 0 2789123456789012345 (id >> 22)

Platform-Specific Timestamp Extraction

🐦 Twitter/X

Epoch: 1288834974657 ms

Formula: (id >> 22) + 1288834974657

Twitter IDs contain millisecond-precision timestamps since November 4, 2010

💬 Discord

Epoch: 1420070400000 ms

Formula: (id >> 22) + 1420070400000

Discord IDs timestamp from January 1, 2015 midnight UTC

📸 Instagram

Epoch: 0 ms (Unix epoch)

Formula: (id >> 22)

Instagram uses standard Unix epoch (January 1, 1970)

Understanding Unix Timestamps

Unix timestamps represent time as the number of milliseconds (or seconds) since January 1, 1970, 00:00:00 UTC (the Unix epoch). This format is universal across programming languages and databases, making it ideal for storing and comparing times.

Milliseconds vs Seconds: JavaScript and many modern APIs use milliseconds (13 digits), while traditional Unix systems use seconds (10 digits). Our converter provides both formats for maximum compatibility.

Code Examples

JavaScript
const snowflakeId = 1382350606417817604n;
const twitterEpoch = 1288834974657n;
const timestamp = (snowflakeId >> 22n) + twitterEpoch;
console.log(Number(timestamp)); // 1618592259657

// Convert to Date
const date = new Date(Number(timestamp));
console.log(date.toISOString()); // 2021-04-16T18:30:59.657Z
Python
snowflake_id = 1382350606417817604
twitter_epoch = 1288834974657
timestamp = (snowflake_id >> 22) + twitter_epoch
print(timestamp)  # 1618592259657

# Convert to datetime
from datetime import datetime
date = datetime.fromtimestamp(timestamp / 1000)
print(date.isoformat())  # 2021-04-16T18:30:59.657000

📝 Real Example

Input: 1382350606417817604 (Twitter ID)

Output: 1618592259657 ms

Date: April 16, 2021, 6:30:59 PM UTC

Meaning: This tweet was posted on April 16, 2021 at 6:30 PM

How Snowflake IDs Work

Bits 22-63 (42 bits)
Timestamp
Bits 17-21 (5 bits)
Worker ID
Bits 12-16 (5 bits)
Process ID
Bits 0-11 (12 bits)
Sequence

Snowflake ID Structure (64 bits total)

Snowflake IDs are 64-bit integers that encode multiple pieces of information. The timestamp occupies the first 42 bits (after right-shifting by 22), providing millisecond precision for approximately 139 years from the epoch.

Common Errors & Solutions

❌ Error: "Invalid snowflake ID"

Cause: ID contains non-numeric characters or is too short

Solution: Remove any spaces, letters, or special characters. Valid IDs are 15-19 digits.

Example: abc123 → Invalid | 1382350606417817604 → Valid

❌ Error: "Date is in the year 1970 or 2010"

Cause: Wrong platform selected

Solution: Try different platform options. Twitter uses 2010 epoch, Discord uses 2015, Instagram uses 1970.

Tip: If the date seems way off, switch platforms until you get a reasonable date.

❌ Error: "Date is in the future"

Cause: ID is too large, corrupted, or not a snowflake ID

Solution: Verify the ID is correct. Some IDs may not follow snowflake format.

Performance & Best Practices

💡 Batch Processing

Processing multiple IDs? Use array mapping for efficiency:

JavaScript
const ids = ['1382350606417817604', '1383000000000000000'];
const timestamps = ids.map(id => 
    Number((BigInt(id) >> 22n) + 1288834974657n)
);

💡 Caching Epochs

Store epoch values as constants for better performance:

JavaScript
const EPOCHS = {
    TWITTER: 1288834974657n,
    DISCORD: 1420070400000n,
    INSTAGRAM: 0n
};

const timestamp = (BigInt(id) >> 22n) + EPOCHS.TWITTER;

💡 Input Validation

Always validate before converting to prevent errors:

JavaScript
function validateSnowflake(id) {
    if (!/^\d{15,19}$/.test(id)) {
        throw new Error('Invalid snowflake ID');
    }
    return true;
}

Common Use Cases

Try These Real Examples

🐦 Twitter
1382350606417817604
→ April 16, 2021
💬 Discord
175928847299117063
→ April 30, 2016
📸 Instagram
2789123456789012345
→ March 15, 2022

Frequently Asked Questions

What's the difference between milliseconds and seconds timestamps?

Milliseconds timestamps have 13 digits and provide millisecond precision (used by JavaScript, Discord, Twitter). Seconds timestamps have 10 digits and provide second precision (traditional Unix systems). Divide milliseconds by 1000 to get seconds.

Can I convert timestamps back to snowflake IDs?

Not exactly. While you can create a snowflake ID from a timestamp, you can't recreate the original ID because it also contains worker ID and sequence number. Use our Snowflake Generator to create new IDs.

Why do I need to select a platform?

Each platform uses a different epoch (starting point). Twitter's epoch is 2010, Discord's is 2015, Instagram uses 1970. Selecting the wrong platform will give you an incorrect timestamp by years.

What if my timestamp looks wrong?

Try a different platform option. If the ID is from Twitter but you selected Discord, the timestamp will be off by ~4 years. The correct platform will show a reasonable date.

Related Tools

🐦 Twitter Snowflake to Timestamp
Convert Twitter IDs to timestamps
💬 Discord Snowflake to Date
Convert Discord IDs to dates
📸 Instagram Media ID Decoder
Decode Instagram post IDs
⏰ Unix Timestamp to Date
Convert Unix timestamps to dates