What is a Discord Snowflake?
A Discord Snowflake is a 64-bit unique identifier used throughout Discord's infrastructure. Every user, message, server, channel, role, and emoji has a unique Snowflake ID that encodes when it was created.
Example Discord Snowflake
This ID was created on April 30, 2016, 11:18:25.796 UTC
Discord Snowflake Structure
Discord Snowflakes are 64-bit integers divided into four components:
42 bits
Timestamp
Milliseconds since epoch
5 bits
Worker ID
0-31 workers
5 bits
Process ID
0-31 processes
12 bits
Sequence
0-4095 per ms
Binary Breakdown
Discord's Epoch
Unlike Unix timestamps that start from January 1, 1970, Discord uses a custom epoch:
Discord Epoch
1420070400000 milliseconds
Using a recent epoch extends the lifespan of 42-bit timestamps by ~139 years from 2015 instead of 1970.
How to Decode Discord Snowflakes
Decoding a Discord Snowflake extracts the timestamp and other components:
// JavaScript - Decode Discord Snowflake
const DISCORD_EPOCH = 1420070400000n;
function decodeSnowflake(id) {
const snowflake = BigInt(id);
// Extract components
const timestamp = Number((snowflake >> 22n) + DISCORD_EPOCH);
const workerId = Number((snowflake >> 17n) & 0x1Fn);
const processId = Number((snowflake >> 12n) & 0x1Fn);
const sequence = Number(snowflake & 0xFFFn);
return {
timestamp: new Date(timestamp),
workerId,
processId,
sequence
};
}
// Example
const result = decodeSnowflake('175928847299117063');
console.log(result);
// {
// timestamp: 2016-04-30T11:18:25.796Z,
// workerId: 1,
// processId: 0,
// sequence: 7
// }
# Python - Decode Discord Snowflake
from datetime import datetime
DISCORD_EPOCH = 1420070400000
def decode_snowflake(snowflake_id):
snowflake = int(snowflake_id)
# Extract components
timestamp = ((snowflake >> 22) + DISCORD_EPOCH) / 1000
worker_id = (snowflake >> 17) & 0x1F
process_id = (snowflake >> 12) & 0x1F
sequence = snowflake & 0xFFF
return {
'timestamp': datetime.fromtimestamp(timestamp),
'worker_id': worker_id,
'process_id': process_id,
'sequence': sequence
}
# Example
result = decode_snowflake('175928847299117063')
print(result)
# {
# 'timestamp': datetime(2016, 4, 30, 11, 18, 25, 796000),
# 'worker_id': 1,
# 'process_id': 0,
# 'sequence': 7
# }
What Uses Discord Snowflakes?
Discord uses Snowflake IDs for virtually everything:
👤 Users
Every Discord user has a unique Snowflake ID that reveals their account creation date
💬 Messages
Each message has a Snowflake ID encoding when it was sent
🏠 Servers (Guilds)
Server IDs show when the server was created
📢 Channels
Text, voice, and category channels all have Snowflake IDs
🎭 Roles
Role IDs encode when the role was created
😀 Emojis
Custom emoji IDs show when they were uploaded
Why Discord Uses Snowflakes
Discord chose the Snowflake ID format for several important reasons:
- Time-ordered: IDs are naturally sorted by creation time
- Distributed generation: Multiple servers can generate IDs without coordination
- High throughput: Can generate 4,096 IDs per millisecond per process
- Compact: 64-bit integers are efficient to store and index
- No collisions: Guaranteed uniqueness across all Discord servers
- Embedded metadata: Timestamp is built into the ID itself
Snowflake Generation Rate
Maximum IDs Per Second
IDs per second per process
With 12 bits for sequence numbers, Discord can generate 4,096 unique IDs per millisecond per process. Across multiple processes and workers, this scales to billions of IDs per second.
How to Get Discord IDs
Enable Developer Mode
- Open Discord Settings
- Go to Advanced settings
- Enable "Developer Mode"
- Right-click on any user, message, server, or channel
- Select "Copy ID" to get the Snowflake ID
Common Use Cases
- Bot Development: Use Snowflake IDs to identify and interact with Discord entities
- Account Age Checking: Decode user IDs to see when accounts were created
- Message Timestamps: Extract exact send times from message IDs
- Server Analytics: Track server creation dates and growth
- Moderation: Verify account ages for security purposes
Try Our Discord Snowflake Tools
Use our free online tools to work with Discord Snowflakes:
- Discord Snowflake Decoder: Convert IDs to timestamps
- Discord Account Age Checker: Find account creation dates
- Discord Snowflake Calculator: Analyze Snowflake components