Try:
Shortcode
Upload Date
Post Age
ISO 8601
Unix Timestamp
Media ID

Last updated

Why Instagram Doesn't Show Exact Post Times

Instagram intentionally hides precise timestamps in its mobile app. Instead of showing "April 3, 2024 at 9:42 AM", you see "3 days ago" or "April 3". There are two reasons for this design choice:

However, the exact timestamp is still encoded inside the post URL — specifically inside the shortcode. This tool extracts it mathematically, with no API calls and no Instagram login required.

Understanding the Output: UTC vs Your Local Time

The decoded date is always in UTC (Coordinated Universal Time) — the same timezone Instagram's servers use. UTC offsets are defined by the IANA Time Zone Database. To convert to your local time:

The ISO 8601 output (e.g. 2023-01-26T23:51:31.000Z) ends with Z, which means UTC. You can paste it directly into any date converter or use new Date("2023-01-26T23:51:31.000Z").toLocaleString() in your browser console to get your local time instantly.

How to Find the Post URL on Mobile

You need the post URL to extract the shortcode. Here's how to get it on any device:

  1. Open the Instagram post in the app.
  2. Tap the three-dot menu (⋯) in the top-right corner of the post.
  3. Tap Copy Link.
  4. Paste the full URL into the input above — the tool extracts the shortcode automatically.

On desktop, the shortcode is visible directly in the browser address bar after /p/, /reel/, or /tv/.

What Is an Instagram Shortcode?

Every Instagram post, reel, and IGTV video has a URL that looks like instagram.com/p/CxYz123abcd/. The alphanumeric string between the slashes — CxYz123abcd in this example — is called the Instagram shortcode. It is not random. It is a base64-encoded version of the numeric media ID that Instagram assigns to every piece of content at the moment it is uploaded.

Because the media ID encodes the upload timestamp inside it, you can reverse-engineer the exact date and time a post was published — down to the second — just from the Instagram shortcode. No Instagram API access, no authentication, and no rate limits required. This Instagram shortcode to date converter does the math instantly in your browser. Whether you need to find the post date, verify an Instagram timestamp, or simply answer "when was this posted?" — the shortcode has the answer.

↑ Try the converter above — paste any Instagram URL or shortcode and get the date instantly.

ℹ️

The shortcode encoding has been stable since Instagram launched in 2011. The algorithm has not changed, so this method works for any post ever published on the platform. Instagram's official developer platform does not expose post timestamps directly via public endpoints — making shortcode decoding the most practical approach.

How to Find an Instagram Shortcode

The Instagram shortcode is always visible in the post URL. Here is where to find it for each content type:

Content TypeURL PatternShortcode Location
Photo / Video Postinstagram.com/p/SHORTCODE/After /p/
Reelinstagram.com/reel/SHORTCODE/After /reel/
IGTVinstagram.com/tv/SHORTCODE/After /tv/

On mobile, tap the three-dot menu on any post and select Copy Link. Paste the full URL into the Instagram shortcode to date converter above — it will extract the shortcode automatically.

How the Decoding Works

Instagram uses a custom base64 alphabet: ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_. Each character in the shortcode represents 6 bits of the underlying numeric media ID. The media ID is a 64-bit integer where the upper 41 bits store the timestamp as milliseconds since the Instagram epoch (January 1, 2011 UTC = Unix ms 1293840000000).

The decoding process in three steps:

  1. Convert each shortcode character to its index in the base64 alphabet.
  2. Reconstruct the 64-bit media ID by treating each index as 6 bits.
  3. Right-shift the media ID by 23 bits — this gives milliseconds since the Instagram epoch. Add 1293840000000 to get a standard Unix millisecond timestamp, then pass directly to new Date().

JavaScript Implementation

JavaScript
const ALPHABET = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_';
const INSTAGRAM_EPOCH_MS = 1293840000000; // Jan 1, 2011 UTC in milliseconds

function shortcodeToDate(input) {
  // Accept full URL or bare shortcode
  const match = input.match(/\/(p|reel|tv)\/([A-Za-z0-9_-]+)/);
  const shortcode = match ? match[2] : input.trim();

  // Decode base64 shortcode → numeric media ID (BigInt for 64-bit precision)
  let mediaId = 0n;
  for (const char of shortcode) {
    mediaId = mediaId * 64n + BigInt(ALPHABET.indexOf(char));
  }

  // mediaId >> 23 = milliseconds since Instagram epoch
  const unixMs = Number(mediaId >> 23n) + INSTAGRAM_EPOCH_MS;
  const date = new Date(unixMs);

  return {
    shortcode,
    date,
    iso: date.toISOString(),
    utc: date.toUTCString(),
    unixSeconds: Math.floor(unixMs / 1000),
    mediaId: mediaId.toString()
  };
}

// Usage:
console.log(shortcodeToDate('CxYz123abcd').utc);
// → "Thu, 26 Jan 2023 23:51:31 GMT"

console.log(shortcodeToDate('https://www.instagram.com/p/BjNLpA1AhXM/').iso);
// → "2017-10-01T18:39:51.914Z"

Python Implementation

Python
import re, datetime

ALPHABET = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_'
INSTAGRAM_EPOCH_MS = 1293840000000  # Jan 1, 2011 UTC in milliseconds

def shortcode_to_date(input_str: str) -> dict:
    match = re.search(r'/(p|reel|tv)/([A-Za-z0-9_-]+)', input_str)
    shortcode = match.group(2) if match else input_str.strip()

    media_id = 0
    for char in shortcode:
        media_id = media_id * 64 + ALPHABET.index(char)

    # media_id >> 23 = milliseconds since Instagram epoch
    unix_ms = (media_id >> 23) + INSTAGRAM_EPOCH_MS
    date = datetime.datetime.fromtimestamp(unix_ms / 1000, tz=datetime.timezone.utc)

    return {
        'shortcode': shortcode,
        'date': date,
        'iso': date.isoformat(),
        'formatted': date.strftime('%B %d, %Y at %H:%M:%S UTC'),
        'unix_seconds': unix_ms // 1000,
        'media_id': media_id
    }

# Usage:
result = shortcode_to_date('CxYz123abcd')
print(result['formatted'])
# → "January 26, 2023 at 23:51:31 UTC"

# Batch process a list of URLs:
urls = ['https://www.instagram.com/p/BjNLpA1AhXM/', 'B9p6_UIHkCN']
for url in urls:
    r = shortcode_to_date(url)
    print(f"{r['shortcode']} → {r['iso']}")

Real-World Use Cases

Verifying contest and giveaway deadlines

If you're running a time-sensitive giveaway on Instagram, the exact post timestamp proves when entries were submitted. The shortcode-encoded date cannot be altered — it's baked into the URL permanently. This makes it useful for settling disputes about whether an entry was submitted before or after a deadline.

Fact-checking viral screenshots

When a screenshot of an Instagram post circulates online with a claim about when it was posted, you can verify it independently. The shortcode in the URL is mathematically tied to the upload timestamp — it cannot be changed without pointing to a completely different post. If the decoded date does not match the claim, the screenshot has been manipulated.

Social media analytics and competitive research

Marketers and researchers often need to know when a competitor or influencer first posted about a topic. Instead of scrolling through thousands of posts, use this Instagram shortcode decoder to get the exact upload date from any post URL instantly — no API, no scraping, no rate limits.

Legal and compliance purposes

In copyright disputes, impersonation cases, or content ownership claims, the exact post timestamp can serve as evidence. The shortcode-derived date is mathematically verifiable and independent of Instagram's interface.

Bulk data processing without API limits

The Instagram API has strict rate limits and requires authentication. Instagram shortcode decoding requires neither. You can process millions of Instagram post URLs offline using the Python implementation above — no API calls, no tokens, and no throttling. Each shortcode decodes to a date in microseconds.

💡

Tip: The same shortcode appears in both the post URL and the reel URL for the same content. instagram.com/p/ABC and instagram.com/reel/ABC with the same shortcode decode to the same date.

Limitations

Frequently Asked Questions

An Instagram shortcode is the alphanumeric string in a post URL, found after /p/, /reel/, or /tv/. For example, in instagram.com/p/CxYz123abcd/ the shortcode is CxYz123abcd. It is a base64-encoded version of the numeric media ID, which encodes the upload timestamp inside it.
Open the Instagram post in a browser. Look at the URL — it will look like instagram.com/p/SHORTCODE/. The SHORTCODE part is what you need. You can also paste the full URL directly into this tool and it will extract the shortcode automatically.
The decoded date is accurate to the second. The timestamp is mathematically encoded inside the shortcode — it is not an estimate. Instagram has used this encoding since 2011 and the algorithm has not changed.
Yes. The same shortcode format is used for regular posts (/p/), Reels (/reel/), and IGTV (/tv/). Stories do not have permanent shortcodes because they expire after 24 hours.
Yes — no API is needed. The upload timestamp is encoded directly inside the shortcode using base64 arithmetic. This tool decodes it entirely in your browser with no server calls, no rate limits, and no authentication required.
The Instagram epoch is January 1, 2011 at 00:00:00 UTC (Unix timestamp in milliseconds: 1293840000000). All Instagram media IDs store time as milliseconds elapsed since this date. Right-shifting the media ID by 23 bits gives the number of milliseconds since this epoch.