DevToolsmith

Snowflake ID Decoder and Timestamp Converter

Find out exactly when a Discord message, user or server, or a Twitter/X post, was created. Paste an ID or a link to decode the timestamp and internal fields, or turn a date into a Snowflake for pagination.

Runs 100% in your browser — nothing is uploaded

Date → Snowflake

The smallest Discord Snowflake for a moment in time. Use it as an after / before cursor to fetch messages or posts from a date range.

What is a Snowflake ID?

A Snowflake is a 64-bit unique ID format created by Twitter in 2010 and later adopted by Discord, Mastodon, Instagram and many others. Every Snowflake embeds the time it was created, so you can extract that time with simple bit shifting. No API call is needed.

Snowflake bit layouts

PlatformTimestampEpochRemaining bits
Discord42 bits (ms)2015-01-01 5-bit worker ID, 5-bit process ID, 12-bit increment
Twitter / X41 bits (ms)2010-11-04 10-bit machine ID, 12-bit sequence
Mastodon48 bits (ms)1970-01-01 (Unix) 16-bit sequence data

To get the timestamp, shift the ID right by the number of low bits (22 for Discord and Twitter, 16 for Mastodon) and add the epoch. Use the Custom preset for your own Snowflake-style generator with a different epoch.

Common uses

  • Account age checks: see when a Discord account was created, which helps spot fresh spam or raid accounts.
  • Moderation and support: find exactly when a message was sent, even after it was edited.
  • Pagination by date: use the Date → Snowflake converter to build an ID for the before/after parameters of Discord's message history API, or X's since_id/until_id.
  • Debugging: sort and correlate events across services that use Snowflake IDs.

Decode a Snowflake in code

JavaScript

// Discord: milliseconds since 2015-01-01T00:00:00Z
const DISCORD_EPOCH = 1420070400000n;

function snowflakeToDate(id) {
  return new Date(Number((BigInt(id) >> 22n) + DISCORD_EPOCH));
}

snowflakeToDate('175928847299117063'); // 2016-04-30T11:18:25.796Z

Python

from datetime import datetime, timezone

DISCORD_EPOCH = 1420070400000

def snowflake_to_datetime(sid: int) -> datetime:
    ms = (sid >> 22) + DISCORD_EPOCH
    return datetime.fromtimestamp(ms / 1000, tz=timezone.utc)

snowflake_to_datetime(175928847299117063)
# datetime.datetime(2016, 4, 30, 11, 18, 25, 796000, tzinfo=timezone.utc)

Comparing ID formats? See the ULID, UUID v7 and MongoDB ObjectId tools. Those formats also embed a timestamp.

Frequently asked questions

How do I find when a Discord account or message was created?

Enable Developer Mode in Discord (Settings → Advanced), right-click a user, message, server or channel and choose "Copy ID". Paste the ID above with the Discord preset. The timestamp shown is the exact creation time.

What is the Discord epoch?

Discord Snowflakes count milliseconds from 1420070400000, the first second of 2015 (2015-01-01T00:00:00Z). Twitter/X uses 1288834974657, which is 2010-11-04T01:42:54.657Z.

Why does JavaScript give me the wrong number for a Snowflake ID?

Snowflakes are 64-bit integers, but JavaScript numbers lose precision above 2^53. Always keep IDs as strings and use BigInt for arithmetic. That is why Discord’s and X’s APIs return IDs as strings.

Can I get the tweet date from a Twitter/X status URL?

Yes. Paste the full URL (for example https://x.com/user/status/1800000000000000000) with the Twitter / X preset. The tool extracts the ID and decodes the time the post was published. This only works for posts from November 2010 onward, when Snowflake IDs were introduced.

Are Snowflake IDs unique and sortable?

Yes. Because the timestamp occupies the highest bits, sorting Snowflakes numerically sorts them by creation time. The worker and sequence bits make IDs created in the same millisecond unique across machines.