Shortcode ⇄ Media ID Converter v1.0

Paste an Instagram post/reel URL, shortcode, or numeric media ID — get the other one back instantly, in bulk. No account, no API key.

instagram.com/p/CWbFLNOMRcl/ → 2709782361137026853 (real, verified pair)

Convert

One item per line. Mix and match — full URLs, bare shortcodes, and numeric IDs are all auto-detected.

Tip: press Cmd/Ctrl + Enter in the box to convert. Facebook pfbid… links aren't supported — see FAQ below.

① Paste URLs, shortcodes, or IDs → ② Click Convert → ③ Get the missing half for each one

What converts into what

You pasteYou get back
Instagram post or reel URLShortcode + legacy Media ID
Shortcode (e.g. CWbFLNOMRcl)Legacy Media ID
Legacy Media IDShortcode

How it works

What is this actually decoding?
Instagram builds each post/reel shortcode — the part of the URL after /p/ or /reel/ — by taking the item's legacy numeric media ID and encoding it with the same URL-safe base64 alphabet defined in RFC 4648 (A–Z, a–z, 0–9, -, _). This tool runs that encoding in both directions entirely in your browser using JavaScript's BigInt, so nothing you paste ever leaves your machine.
Why doesn't this match the ID the Graph API gives me?
Meta actually uses more than one ID space for the same piece of media. The ID embedded in the shortcode — labeled "Media ID (legacy)" throughout this tool — is the classic web/media ID. When you fetch a post through the Instagram Graph API — e.g. /me/media or the Marketing API — you can get back a different-looking numeric ID for that same post. Both are "real," they just belong to different systems, and this tool only bridges the shortcode and the legacy ID. If an API call needs the Graph API's own ID, pull it from that API response directly rather than deriving it from the shortcode.
Does this work for Facebook post links?
No, and it's intentional on Meta's side. Older Facebook links exposed a plain numeric post ID, but current links use a pfbid… token — Meta has described these as combining a timestamp with the real ID into a value that rotates over time specifically to make them harder to reverse-engineer or scrape. There's no reliable way to recover the original numeric ID from a pfbid token client-side, so this tool flags those instead of guessing.
What's the "Est. date" column?
A bonus, unofficial extra: Instagram media IDs are 64-bit numbers where the leading 41 bits encode a millisecond timestamp, the same general scheme used by Twitter's Snowflake IDs. Instagram has never published the epoch those timestamps count from; this tool uses 2011-08-24T21:07:00Z, a value researchers arrived at by analyzing thousands of real posts. Treat the date as an estimate, not a source of record — it's left blank when the math produces something outside a sane range.