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:

  • 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

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

  • 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

Last updated

What Is a Discord Snowflake?

A Discord Snowflake is the unique identifier system Discord uses for every object on its platform — users, servers, channels, messages, roles, emojis, and more. Snowflake IDs are 64-bit integers that look like large random numbers but actually encode structured information: a creation timestamp, an internal worker ID, a process ID, and a sequence number. Understanding how Snowflakes work is fundamental for Discord bot development and API integration.

Discord Snowflakes use 64 bits: 42 bits for timestamp (milliseconds since January 1, 2015), 5 bits for worker ID, 5 bits for process ID, and 12 bits for sequence number. This allows Discord to generate 4096 unique IDs per millisecond per process.

Discord's epoch is January 1, 2015, 00:00:00 UTC (1420070400000 milliseconds). All Discord Snowflake IDs encode timestamps relative to this epoch, not the Unix epoch of 1970.

To decode a Discord Snowflake: right-shift the ID by 22 bits to extract the timestamp, add Discord's epoch (1420070400000), and convert to a date. Use our free Discord Snowflake decoder tool for instant conversion.

Frequently Asked Questions

A Discord Snowflake is a 64-bit unique identifier used for users, messages, servers, and other entities. It encodes the creation timestamp, worker ID, process ID, and sequence number. For example, ID 175928847299117063 was created on April 30, 2016.