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:
- Interface simplicity: Instagram's focus is on photos and videos, not metadata. Precise timestamps on every post would clutter the feed.
- Perceived recency: "5 minutes ago" feels more current than a static date. Relative timestamps make content feel fresher and more engaging.
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:
- UTC+1 (London, summer): add 1 hour
- UTC+2 (Paris, Berlin, summer): add 2 hours
- UTC-5 (New York, EST): subtract 5 hours
- UTC-8 (Los Angeles, PST): subtract 8 hours
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:
- Open the Instagram post in the app.
- Tap the three-dot menu (⋯) in the top-right corner of the post.
- Tap Copy Link.
- 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 Type | URL Pattern | Shortcode Location |
|---|---|---|
| Photo / Video Post | instagram.com/p/SHORTCODE/ | After /p/ |
| Reel | instagram.com/reel/SHORTCODE/ | After /reel/ |
| IGTV | instagram.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:
- Convert each shortcode character to its index in the base64 alphabet.
- Reconstruct the 64-bit media ID by treating each index as 6 bits.
- Right-shift the media ID by 23 bits — this gives milliseconds since the Instagram epoch. Add
1293840000000to get a standard Unix millisecond timestamp, then pass directly tonew Date().
JavaScript Implementation
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
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
- Stories: Instagram Stories do not have permanent shortcodes because they expire after 24 hours. Highlights saved from Stories get new media IDs and are decodable.
- Private posts: The date can be decoded from the shortcode alone, but you need the URL first — which requires the post to be visible to you.
- Precision: The timestamp is accurate to the second. Sub-second precision is not available from the shortcode.
- Very old posts: Posts from before Instagram's launch in do not exist, so any decoded date before that is invalid input.
- Deleted posts: The shortcode still decodes to a valid date even after a post is deleted — the timestamp is baked into the ID permanently.