Decode Instagram Post Shortcode

Enter Post Shortcode

Post Created On

Shortcode
Media ID
Full Date & Time
Unix Timestamp

Try These Examples

PHOTO POST
CwkxyiVP2MU
📅 July 23, 2023
CAROUSEL POST
C5pqrXYZ123
📅 January 15, 2024
IMAGE POST
DAbcdefGHIJ
📅 June 10, 2024

Instagram Posts vs Reels

Understanding the Difference

Instagram Posts

  • Regular photo posts
  • Carousel posts (multiple images)
  • Image posts with captions
  • URL format: /p/shortcode/
  • Same decoding method as reels

Instagram Reels

  • Short video content
  • Vertical video format
  • Reels with music/effects
  • URL format: /reel/shortcode/
  • Same decoding method as posts

Important Note

Instagram posts and reels use the exact same shortcode format! The decoding process is identical for both. Whether it's a photo post, carousel, or reel, this tool works the same way.

How to Find Instagram Post Shortcodes

  1. Open the Instagram post in your browser
  2. Look at the URL: instagram.com/p/shortcode/
  3. Copy the shortcode (the part between /p/ and the next /)
  4. Paste it into the decoder above

Example URLs

Post: https://instagram.com/p/CwkxyiVP2MU/

Reel: https://instagram.com/reel/CwkxyiVP2MU/

Both use the same shortcode format!

Why Decode Instagram Post Shortcodes?

  • Content research: Find when popular posts were created
  • Trend analysis: Track posting patterns over time
  • Verification: Confirm post authenticity by checking creation date
  • Data collection: Build datasets with accurate timestamps
  • Historical analysis: Study content evolution on Instagram

Frequently Asked Questions

What's the difference between post and reel shortcodes?

There's no difference! Instagram uses the same shortcode format for posts, reels, carousels, and all other content types. The decoding process is identical.

Can I decode carousel posts?

Yes! Carousel posts (multiple images) use the same shortcode format. This tool works for all Instagram content types.

Do I need the full URL?

No, you only need the shortcode itself (e.g., CwkxyiVP2MU). You don't need the full instagram.com URL.

Is this different from the reel decoder?

No, it's the same tool! Posts and reels use identical shortcode formats. We created this page to help users who specifically search for "post" decoding.

Last updated

Quick Reference

Paste any Instagram post URL or shortcode to instantly decode its creation date.

Examples

Example 1: Finding the Shortcode in a Post URL

Instagram post URL format:
  https://www.instagram.com/p/SHORTCODE/

Examples:
  https://www.instagram.com/p/CxYz123abc/   → shortcode: CxYz123abc
  https://www.instagram.com/p/B1a2b3c4d5e/  → shortcode: B1a2b3c4d5e
  https://www.instagram.com/reel/CxYz123abc/ → shortcode: CxYz123abc (reels use same format)

The shortcode is always:
  - Located between /p/ and the trailing /
  - Alphanumeric characters, hyphens, and underscores
  - Typically 11 characters for modern posts
  - Shorter for older posts (Instagram's early posts had 8-9 character codes)

Example 2: How Shortcode Decoding Works

Step 1: Convert shortcode to numeric media ID

Instagram's Base64 alphabet:
  A-Z = 0-25
  a-z = 26-51
  0-9 = 52-61
  -   = 62
  _   = 63

Example shortcode: "CxYz123abc"

Each character → 6-bit value:
  C → 2   → 000010
  x → 49  → 110001
  Y → 24  → 011000
  z → 51  → 110011
  1 → 53  → 110101
  2 → 54  → 110110
  3 → 55  → 110111
  a → 26  → 011010
  b → 27  → 011011
  c → 28  → 011100

Concatenate bits → 60-bit integer → numeric media ID

Step 2: Extract timestamp from media ID
  timestamp_seconds = (media_id >> 23) + 1293840000
  created_at = new Date(timestamp_seconds * 1000)

Example 3: JavaScript Implementation

const INSTAGRAM_EPOCH = 1293840000; // Jan 1, 2011

// Instagram's Base64 alphabet
const ALPHABET = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_';

function shortcodeToMediaId(shortcode) {
  let id = 0n;
  for (const char of shortcode) {
    const value = ALPHABET.indexOf(char);
    if (value === -1) throw new Error(`Invalid character: ${char}`);
    id = id * 64n + BigInt(value);
  }
  return id;
}

function decodeShortcode(shortcode) {
  // Remove URL if full URL was pasted
  const match = shortcode.match(/\/p\/([A-Za-z0-9_-]+)/);
  const code = match ? match[1] : shortcode;

  const mediaId = shortcodeToMediaId(code);
  const timestampSeconds = Number(mediaId >> 23n) + INSTAGRAM_EPOCH;
  const createdAt = new Date(timestampSeconds * 1000);

  return {
    shortcode: code,
    mediaId: String(mediaId),
    createdAt,
    iso: createdAt.toISOString()
  };
}

// Usage:
const result = decodeShortcode('CxYz123abc');
console.log(result.iso);     // "2023-08-15T14:32:07.000Z"
console.log(result.mediaId); // "2847392847392847392"

// Also works with full URLs:
const result2 = decodeShortcode('https://www.instagram.com/p/CxYz123abc/');
console.log(result2.iso); // Same result

Frequently Asked Questions

Yes, our Instagram Post Shortcode To Date Decoder is completely free with no registration required. Use it unlimited times without any restrictions.

Yes, all processing happens locally in your browser. Your data never leaves your device and is not stored on our servers.

No installation needed. The tool works directly in your web browser on any device.

The tool supports all standard formats. Simply paste your input and the conversion happens instantly.

Yes, you can process multiple conversions by using the tool repeatedly. Each conversion is instant.