Last updated
How Twitter User IDs Encode Timestamps
Twitter Snowflake IDs are 64-bit integers. The top 41 bits store milliseconds elapsed since Twitter's epoch: November 4, 2010 at 01:42:54 UTC. To extract the timestamp:
timestamp_ms = (user_id >> 22) + 1288834974657
creation_date = new Date(timestamp_ms)
Key Facts About Twitter User ID Decoding
- Twitter's Snowflake epoch is November 4, 2010 at 01:42:54 UTC (1288834974657 ms)
- Right-shift the user ID by 22 bits to extract the timestamp component
- Add the epoch to get Unix time in milliseconds
- Pre-Snowflake accounts (IDs below ~100M) cannot be decoded this way
- The decoded date is more precise than Twitter's displayed "Joined Month Year"
- No API calls are needed — the date is embedded in the ID itself
Use TechConverter's decoder tool to paste any Twitter user ID and instantly see the account creation date without writing any code.
Examples
Example 1: Decoding a Well-Known Account
Twitter's own account (@Twitter) has user ID 783214. This is a pre-Snowflake ID (created before November 2010), so the timestamp cannot be extracted from the ID itself. The account was created in February 2006.
A more recent example — user ID 2244994945 (Twitter Dev account):
User ID: 2244994945
Binary: 0000000000000000000000000000000010000101110001000001001000000001
Timestamp bits (top 41): extracted via right-shift by 22
Timestamp ms: (2244994945 >> 22) + 1288834974657 = 1305216000000
Creation date: May 12, 2011 at 16:00:00 UTC
Example 2: JavaScript Decoder
function decodeTwitterUserId(userId) {
const TWITTER_EPOCH = 1288834974657n;
const id = BigInt(userId);
const timestampMs = (id >> 22n) + TWITTER_EPOCH;
return new Date(Number(timestampMs));
}
// Usage
const date = decodeTwitterUserId("2244994945");
console.log(date.toISOString()); // 2011-05-12T16:00:00.000Z
Example 3: Python Decoder
from datetime import datetime, timezone
TWITTER_EPOCH = 1288834974657 # milliseconds
def decode_twitter_user_id(user_id: int) -> datetime:
timestamp_ms = (user_id >> 22) + TWITTER_EPOCH
return datetime.fromtimestamp(timestamp_ms / 1000, tz=timezone.utc)
# Example
user_id = 2244994945
created_at = decode_twitter_user_id(user_id)
print(created_at) # 2011-05-12 16:00:00+00:00