Last updated
Discord Snowflake Timestamp Converter
Convert Discord Snowflake IDs to Unix timestamps. Every Discord ID (user, message, server, channel) contains a timestamp that shows when it was created. This tool extracts that timestamp and converts it to standard Unix time.
Discord Snowflake Epoch
Discord uses January 1, 2015, 00:00:00 UTC (1420070400000 milliseconds) as its epoch. All Discord IDs encode time relative to this date.
Code Examples
Epoch Difference
Discord epoch: January 1, 2015 = 1420070400000 ms (Unix time)
Unix epoch: January 1, 1970 = 0 ms
Difference: 1420070400000 ms = 1420070400 seconds
Quick Reference
- Discord epoch (ms):
1420070400000 - Discord epoch (s):
1420070400 - Snowflake → Unix ms:
(id >> 22) + 1420070400000 - Unix ms → Snowflake:
(unix_ms - 1420070400000) << 22 - JavaScript timestamps are in milliseconds
- Python/SQL timestamps are typically in seconds
Use TechConverter's Discord Snowflake Timestamp Converter to instantly convert between any Discord Snowflake ID and its Unix timestamp equivalent.
// JavaScript
function discordIdToTimestamp(id) {
const DISCORD_EPOCH = 1420070400000n;
const snowflake = BigInt(id);
const timestamp = Number((snowflake >> 22n) + DISCORD_EPOCH);
return timestamp;
}
// Example
const timestamp = discordIdToTimestamp('175928847299117063');
console.log(timestamp); // 1462015105796
console.log(new Date(timestamp)); // 2016-04-30T11:18:25.796Z
# Python
from datetime import datetime
def discord_id_to_timestamp(snowflake_id):
DISCORD_EPOCH = 1420070400000
timestamp = ((int(snowflake_id) >> 22) + DISCORD_EPOCH) / 1000
return timestamp
# Example
timestamp = discord_id_to_timestamp('175928847299117063')
print(timestamp) # 1462015105.796
print(datetime.fromtimestamp(timestamp)) # 2016-04-30 11:18:25.796000
Use Cases
- Message timestamps: Find when Discord messages were sent
- Account age: Determine when Discord accounts were created
- Server creation: See when Discord servers were established
- Bot development: Debug timing issues in Discord bots
- Moderation: Track user activity timelines
Examples
Example 1: Snowflake to Unix Timestamp
Snowflake: 817263991139819520
Step 1: Extract timestamp bits
817263991139819520 >> 22 = 194943344
Step 2: Add Discord epoch (ms)
194943344 + 1420070400000 = 1420265343344
Result:
Unix timestamp (ms): 1420265343344
Unix timestamp (s): 1420265343
ISO 8601: 2021-02-12T08:15:44.123Z
Example 2: Unix Timestamp to Snowflake
Unix timestamp (s): 1704067200 (= January 1, 2024 00:00:00 UTC)
Unix timestamp (ms): 1704067200000
Step 1: Convert to ms if needed
1704067200 * 1000 = 1704067200000
Step 2: Subtract Discord epoch
1704067200000 - 1420070400000 = 283996800000
Step 3: Left-shift by 22
283996800000 << 22 = 1191100416000000000
Result: Minimum Snowflake ID for January 1, 2024
Example 3: JavaScript Converter
const DISCORD_EPOCH_MS = 1420070400000;
// Snowflake → Unix timestamp
function snowflakeToUnix(id) {
const ms = Number((BigInt(id) >> 22n) + BigInt(DISCORD_EPOCH_MS));
return {
ms,
seconds: Math.floor(ms / 1000),
iso: new Date(ms).toISOString()
};
}
// Unix timestamp → Snowflake
function unixToSnowflake(unixMs) {
return ((BigInt(unixMs) - BigInt(DISCORD_EPOCH_MS)) << 22n).toString();
}
// Examples
console.log(snowflakeToUnix("817263991139819520"));
// { ms: 1613117744123, seconds: 1613117744, iso: "2021-02-12T08:15:44.123Z" }
console.log(unixToSnowflake(1704067200000));
// "1191100416000000000"
Frequently Asked Questions
Paste the Discord Snowflake ID into the converter and click 'Convert to Timestamp'. You'll get the Unix timestamp in milliseconds and seconds, plus the exact date and time. Discord uses epoch January 1, 2015 for all Snowflake IDs.
Discord's Snowflake epoch is January 1, 2015, 00:00:00 UTC (1420070400000 milliseconds). All Discord IDs encode timestamps relative to this epoch.