Decode Discord Message ID

💬 Discord Message
MESSAGE SENT
DISCORD MESSAGE ID
📅 SENT ON
⏰ SEND TIME
🌍 UTC TIMESTAMP
WORKER
PROCESS
SEQUENCE

Last updated

Discord Message ID Snowflake Decoder

Decode Discord message ID Snowflakes to find when messages were sent. Every Discord message has a unique Snowflake ID that contains the message send timestamp.

How to Get Discord Message IDs

Step 1: Enable Developer Mode

Settings → Advanced → Toggle "Developer Mode" ON

Step 2: Copy Message ID

Right-click any message → Select "Copy ID"

Step 3: Decode

Paste the ID into our decoder to see when it was sent

Snowflake Structure

64-bit Snowflake layout:
┌─────────────────────────────────────────┬──────────┬──────────┬────────────┐
│ Timestamp (42 bits)                     │ Worker   │ Process  │ Increment  │
│ ms since Discord epoch (Jan 1, 2015)    │ (5 bits) │ (5 bits) │ (12 bits)  │
└─────────────────────────────────────────┴──────────┴──────────┴────────────┘

Bit positions:
  63–22: timestamp (milliseconds since 2015-01-01T00:00:00Z)
  21–17: internal worker ID (0–31)
  16–12: internal process ID (0–31)
  11–0:  increment counter (0–4095)

Key Properties of Discord Message Snowflakes

  • Monotonically increasing — higher ID = later message
  • Millisecond precision — more accurate than displayed timestamps
  • Globally unique — no two messages share the same ID
  • Immutable — message ID never changes, even if the message is edited
  • Retired on deletion — deleted message IDs are never reused
  • Usable as API cursors — use as before/after parameters for pagination

Use TechConverter's Discord Message ID Decoder to instantly decode any message Snowflake and see all its components.

What You Can Learn

  • Exact message send date and time
  • How long ago the message was sent
  • Timestamp in multiple formats
  • Internal Snowflake components

Use Cases

  • Track message timelines in conversations
  • Verify message timestamps for moderation
  • Analyze Discord chat patterns
  • Debug Discord bot message tracking
  • Research conversation chronology
  • Find when specific messages were sent

Discord Message ID Format

Discord message IDs are 64-bit Snowflake IDs with this structure:

  • 42 bits: Timestamp (milliseconds since Jan 1, 2015)
  • 5 bits: Worker ID
  • 5 bits: Process ID
  • 12 bits: Sequence number

Code Example

// JavaScript
const DISCORD_EPOCH = 1420070400000n;
const messageId = 987654321098765432n;
const timestamp = Number((messageId >> 22n) + DISCORD_EPOCH);
const date = new Date(timestamp);
console.log(date); // Message send time

Examples

Example 1: Decoding All Snowflake Components

Message ID: 817263991139819520

Binary (64 bits):
0000101101010001001001001001001001001001001001001001001000000000

Decoded:
  Timestamp:  (817263991139819520 >> 22) + 1420070400000
            = 194943344 + 1420070400000
            = 1420265343344 ms
            = 2015-01-03T06:29:03.344Z

  Worker ID:  (817263991139819520 & 0x3E0000) >> 17 = 1
  Process ID: (817263991139819520 & 0x1F000) >> 12  = 0
  Increment:  817263991139819520 & 0xFFF             = 0

Example 2: Full JavaScript Decoder

function decodeSnowflake(id) {
  const DISCORD_EPOCH = 1420070400000n;
  const snowflake = BigInt(id);

  return {
    timestamp: Number((snowflake >> 22n) + DISCORD_EPOCH),
    workerId:  Number((snowflake >> 17n) & 0x1Fn),
    processId: Number((snowflake >> 12n) & 0x1Fn),
    increment: Number(snowflake & 0xFFFn),
    date:      new Date(Number((snowflake >> 22n) + DISCORD_EPOCH))
  };
}

const msg = decodeSnowflake("817263991139819520");
console.log(msg.date.toISOString()); // 2021-02-12T08:15:44.123Z
console.log(msg.workerId);           // 1
console.log(msg.processId);          // 0
console.log(msg.increment);          // 0

Example 3: Constructing a Snowflake for API Pagination

// Create a fake Snowflake ID for a specific timestamp
// Used as 'before' or 'after' cursor in Discord API message history
function makeSnowflake(date) {
  const DISCORD_EPOCH = 1420070400000n;
  const ms = BigInt(date.getTime());
  return String((ms - DISCORD_EPOCH) << 22n);
}

// Fetch messages from January 2024
const jan2024 = makeSnowflake(new Date('2024-01-01T00:00:00Z'));
console.log(jan2024); // "1191100416000000000" (approximate)

// Use in API: GET /channels/{id}/messages?after=1191100416000000000

Frequently Asked Questions

Enter the Discord message ID into our decoder. The tool extracts the timestamp from the Snowflake ID and displays when the message was sent. Discord message IDs are Snowflake IDs that encode the message send timestamp using epoch January 1, 2015.

Enable Developer Mode in Discord settings (User Settings → Advanced → Developer Mode). Then right-click any message and select 'Copy ID'. This copies the Discord message ID Snowflake.

Yes! Every Discord message ID is a Snowflake ID containing the message send timestamp. Use our decoder to convert any Discord message ID to see exactly when that message was sent, accurate to the millisecond.

A Discord message ID Snowflake is a 64-bit unique identifier assigned to each Discord message. It encodes the message send timestamp (42 bits), worker ID (5 bits), process ID (5 bits), and sequence number (12 bits).