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 About Instagram Media IDs

Paste any Instagram media ID to instantly decode its creation timestamp. No API access or authentication required.

Error: "Date seems incorrect"

Cause: Wrong platform epoch being used

Solution: Verify you're using the correct converter for your platform (Instagram).

Tip: Instagram uses epoch: 0 ms

Error: "Date is in the future"

Cause: ID is too large, corrupted, or not a snowflake ID

Solution: Verify the ID is correct and from Instagram.

Performance & Best Practices

Batch Processing

Processing multiple IDs? Use array mapping for efficiency:

JavaScript
const ids = ['2789123456789012345', '1383000000000000000'];
const timestamps = ids.map(id => 
    Number((BigInt(id) >> 22n) + 0n)
);

Input Validation

Always validate before converting to prevent errors:

JavaScript
function validateSnowflake(id) {
    if (!/^\d{15,19}$/.test(id)) {
        throw new Error('Invalid snowflake ID');
    }
    return true;
}

Frequently Asked Questions

Where do I find Instagram media IDs?

Media IDs are available through the Instagram API, browser developer tools, or by inspecting page source. They're not visible in the regular Instagram interface.

Do Instagram Reels use the same ID format?

Yes, Instagram Reels, posts, stories, and IGTV videos all use the same snowflake ID format. All can be decoded using this tool.

Can I decode Instagram shortcodes?

Shortcodes (the alphanumeric codes in URLs) are different from media IDs. Use our Instagram Shortcode Decoder for those.

Why is the timestamp in milliseconds?

Instagram, like most modern platforms, uses millisecond-precision timestamps for accurate time tracking. Divide by 1000 to get seconds if needed.

Examples

Example 1: Basic Media ID Decoding

Instagram Media ID: 2847392847392847392

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

How it works:
  Instagram uses a Snowflake-like ID system
  Epoch: January 1, 2011 (Unix timestamp: 1293840000)

  timestamp_seconds = (media_id >> 23) + 1293840000
  created_at = new Date(timestamp_seconds * 1000)

Example 2: JavaScript Decoder

// Instagram Media ID → Creation Date
// Note: Use BigInt for large IDs in JavaScript

const INSTAGRAM_EPOCH = 1293840000; // Jan 1, 2011 in seconds

function decodeInstagramMediaId(mediaId) {
  const id = BigInt(mediaId);

  // Extract timestamp (upper bits, right-shift by 23)
  const timestampSeconds = Number(id >> 23n) + INSTAGRAM_EPOCH;

  return {
    createdAt: new Date(timestampSeconds * 1000),
    timestampSeconds,
    timestampMs: timestampSeconds * 1000
  };
}

// Usage:
const result = decodeInstagramMediaId('2847392847392847392');
console.log(result.createdAt.toISOString());
// → "2023-08-15T14:32:07.000Z"

// Batch decode multiple IDs:
const mediaIds = ['2847392847392847392', '2900000000000000000', '3000000000000000000'];
const decoded = mediaIds.map(id => ({
  id,
  ...decodeInstagramMediaId(id)
}));
decoded.forEach(item => {
  console.log(`${item.id} → ${item.createdAt.toISOString()}`);
});

Example 3: Python Decoder

import datetime

INSTAGRAM_EPOCH = 1293840000  # Jan 1, 2011

def decode_instagram_media_id(media_id: int) -> dict:
    """Decode an Instagram media ID to extract creation timestamp."""
    timestamp_seconds = (media_id >> 23) + INSTAGRAM_EPOCH
    created_at = datetime.datetime.fromtimestamp(
        timestamp_seconds,
        tz=datetime.timezone.utc
    )
    return {
        'created_at': created_at,
        'timestamp_seconds': timestamp_seconds,
        'formatted': created_at.strftime('%Y-%m-%d %H:%M:%S UTC')
    }

# Usage:
result = decode_instagram_media_id(2847392847392847392)
print(result['formatted'])
# → "2023-08-15 14:32:07 UTC"

# Process a list of media IDs from the Instagram API:
media_ids = [2847392847392847392, 2900000000000000000]
for media_id in media_ids:
    info = decode_instagram_media_id(media_id)
    print(f"ID {media_id}: {info['formatted']}")

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.