Decode Instagram Media ID

Enter Instagram post, reel, or story ID to extract creation date

Post Created On
Unix Timestamp (milliseconds)
Unix Timestamp (seconds)
ISO 8601 Format

Last updated

Key Facts

Enter any Instagram post ID to instantly decode its creation timestamp. No API access required.

Examples

Example 1: Decoding a Post ID

Instagram Post ID: 2847392847392847392

Decoded result:
  Created at:     2023-08-15 14:32:07 UTC
  Unix timestamp: 1692109927000 (milliseconds)
  Post age:       ~1 year, 7 months ago

The post ID encodes:
  - Creation timestamp (upper bits)
  - Shard ID (middle bits)
  - Sequence number (lower bits)

Formula:
  timestamp_seconds = (post_id >> 23) + 1293840000
  created_at = datetime.fromtimestamp(timestamp_seconds)

Example 2: JavaScript Implementation

const INSTAGRAM_EPOCH = 1293840000; // Jan 1, 2011 (seconds)

function decodePostId(postId) {
  // Use BigInt to avoid precision loss with large integers
  const id = BigInt(postId);
  const timestampSeconds = Number(id >> 23n) + INSTAGRAM_EPOCH;

  const createdAt = new Date(timestampSeconds * 1000);

  return {
    createdAt,
    timestampSeconds,
    iso: createdAt.toISOString(),
    readable: createdAt.toLocaleString('en-US', {
      timeZone: 'UTC',
      year: 'numeric',
      month: 'long',
      day: 'numeric',
      hour: '2-digit',
      minute: '2-digit',
      second: '2-digit',
      timeZoneName: 'short'
    })
  };
}

// Example:
const info = decodePostId('2847392847392847392');
console.log(info.iso);      // "2023-08-15T14:32:07.000Z"
console.log(info.readable); // "August 15, 2023 at 02:32:07 PM UTC"

Example 3: Python Implementation

import datetime

INSTAGRAM_EPOCH = 1293840000  # Jan 1, 2011

def decode_post_id(post_id: int) -> dict:
    timestamp_seconds = (post_id >> 23) + INSTAGRAM_EPOCH
    created_at = datetime.datetime.fromtimestamp(
        timestamp_seconds,
        tz=datetime.timezone.utc
    )

    now = datetime.datetime.now(tz=datetime.timezone.utc)
    age = now - created_at

    return {
        'created_at': created_at,
        'timestamp_seconds': timestamp_seconds,
        'age_days': age.days,
        'formatted': created_at.strftime('%B %d, %Y at %H:%M:%S UTC')
    }

# Usage:
result = decode_post_id(2847392847392847392)
print(result['formatted'])
# → "August 15, 2023 at 14:32:07 UTC"
print(f"Post is {result['age_days']} days old")

Frequently Asked Questions

Enter the Instagram media ID and click Decode. The tool extracts the embedded timestamp using the formula: (id >> 22), returning the Unix timestamp and creation date.

An Instagram media ID is a unique snowflake identifier for posts, reels, and stories. It encodes the creation timestamp in the first 41 bits.