❄️ Discord Snowflake Explained

Complete guide to understanding Discord's unique ID system

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

175928847299117063

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

0000001110110001111000010000100000000000000111
↑ Timestamp (42 bits)
↑ Worker (5)
↑ Process (5)
↑ Sequence (12)

Discord's Epoch

Unlike Unix timestamps that start from January 1, 1970, Discord uses a custom epoch:

Discord Epoch

January 1, 2015, 00:00:00 UTC
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
// 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
# 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:

Snowflake Generation Rate

Maximum IDs Per Second

4,096,000

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

  1. Open Discord Settings
  2. Go to Advanced settings
  3. Enable "Developer Mode"
  4. Right-click on any user, message, server, or channel
  5. Select "Copy ID" to get the Snowflake ID

Common Use Cases

Try Our Discord Snowflake Tools

Use our free online tools to work with Discord Snowflakes:

🔗 Related Snowflake ID Tools

🐦 Twitter Snowflake Decoder 💬 Discord Snowflake Decoder 📸 Instagram Snowflake Decoder

📚 Learn More About Snowflake IDs

How to Decode Tutorial Real ID Examples Snowflake Calculator ID to Timestamp