Last updated
Output Format Reference
- Unix timestamp (seconds) — use for database storage, API parameters, date math
- Unix timestamp (milliseconds) — use in JavaScript
new Date(ms) - ISO 8601 — use for display, logging, and interoperability between systems
- Human-readable — use for reports and user-facing displays
Paste any Instagram Reel URL or shortcode to instantly get the Unix timestamp and creation date. No API access or authentication required.
Examples
Example 1: Finding the Shortcode in a Reel URL
Instagram Reel URL format:
https://www.instagram.com/reel/SHORTCODE/
Example:
https://www.instagram.com/reel/CxYz123abcd/
Shortcode: CxYz123abcd
Steps to get the shortcode:
1. Open the Reel in Instagram
2. Tap the three dots (⋯) → Copy Link
3. The copied URL contains the shortcode after /reel/
4. Paste the full URL or just the shortcode into the converter
Example 2: Conversion Process Explained
Shortcode: "CxYz123abcd"
Step 1: Base64 decode to numeric ID
Instagram alphabet: A-Z=0-25, a-z=26-51, 0-9=52-61, -=62, _=63
C → 2
x → 49
Y → 24
z → 51
1 → 53
2 → 54
3 → 55
a → 26
b → 27
c → 28
d → 29
Numeric ID = sum of (value × 64^position_from_right)
Result: 2950000000000000000 (example)
Step 2: Extract timestamp
timestamp_seconds = (2950000000000000000 >> 23) + 1293840000
created_at = new Date(timestamp_seconds * 1000)
Result: 2023-11-20 09:15:42 UTC
Output formats:
Unix timestamp (seconds): 1700471742
Unix timestamp (ms): 1700471742000
ISO 8601: 2023-11-20T09:15:42.000Z
Human-readable: November 20, 2023 at 09:15:42 UTC
Example 3: JavaScript Implementation
const INSTAGRAM_EPOCH = 1293840000;
const ALPHABET = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_';
function reelShortcodeToTimestamp(shortcodeOrUrl) {
// Extract shortcode from URL if needed
const match = shortcodeOrUrl.match(/\/reel\/([A-Za-z0-9_-]+)/);
const shortcode = match ? match[1] : shortcodeOrUrl;
// Base64 decode to numeric ID
let mediaId = 0n;
for (const char of shortcode) {
const value = ALPHABET.indexOf(char);
if (value === -1) throw new Error(`Invalid character: ${char}`);
mediaId = mediaId * 64n + BigInt(value);
}
// Extract timestamp
const timestampSeconds = Number(mediaId >> 23n) + INSTAGRAM_EPOCH;
const createdAt = new Date(timestampSeconds * 1000);
return {
shortcode,
mediaId: String(mediaId),
unixSeconds: timestampSeconds,
unixMs: timestampSeconds * 1000,
iso: createdAt.toISOString(),
createdAt
};
}
// Usage:
const result = reelShortcodeToTimestamp('CxYz123abcd');
console.log(result.unixSeconds); // 1700471742
console.log(result.iso); // "2023-11-20T09:15:42.000Z"
// Works with full URLs too:
const result2 = reelShortcodeToTimestamp('https://www.instagram.com/reel/CxYz123abcd/');
console.log(result2.iso); // Same result