Instagram URL Parser
Introduction
The Toollect Instagram URL Parser answers a small, regular question: what is actually in this Instagram link, and what can I safely remove before I forward it? Paste any Instagram URL and the tool names its type — post, Reel, IGTV, profile, story, guide, hashtag, location, or direct message — then pulls out the username, the shortcode, and the numeric media ID, before rebuilding it as a canonical, tracking-free URL. No account, no API key, and zero network requests.
The problem it removes is the suffix Instagram's app glues onto every link it produces. Copy a link to send to a friend and you get ?igsh=… or ?igshid=… appended — a share fingerprint that tags how the link was copied, from which device, and out of which context. Paste that same link into a document and the parameters travel with it, leaving a trail that points back at the share event rather than the content.
The tool runs entirely in your browser. It reads the URL with the same routing Instagram itself uses, classifies the content behind it, decodes the shortcode to its numeric media ID using base-64url arithmetic, collects the tracking parameters into a removable list, and reassembles the canonical link — all local string work, no request ever leaves the page.
Use Cases
Beyond the obvious "clean this link before I send it," the parser fits into real workflows.
Content creators and community managers
A link copied from Instagram's Share button carries igsh or igshid from the moment you tap copy. Creators pasting their own post and reel links into captions, bios, and articles get a clean URL instead of a device fingerprint — and the embed formats drop straight into a website or blog post without the share trail.
Developers and websites
Embedding a post usually means hand-writing an iframe src. The parser produces the embed URL for the verb you received — /p/{sc}/embed/, /reel/{sc}/embed/, or the captioned variant — so there is no guessing which endpoint serves which verb. The same workflow scales to generated pages: feed a list of shortcodes in, copy clean embed URLs out. The media ID decoding is the bridge to API exports and databases that key on numeric IDs.
Data analysis and archiving
Journalists, researchers, and analysts working with link lists get two jobs done in one paste: the URL is split into structured components (kind, username, shortcode, media ID) for logging, and the stripped-parameter list records exactly which trackers each link carried. Batch work is a series of pastes with no waiting — parsing is instant and local, so a hundred links take about as long as a hundred keystrokes.
Privacy-minded sharing
The igsh parameter tags the device and context a link was copied from — a share fingerprint that travels with the URL. Pasting a link through the parser before forwarding removes it, so the person on the other end receives the content, not a record of where the link came from.
Anatomy of an Instagram Link
Before the parsing mechanics, a map of the territory: every Instagram link is the same handful of parts, and the parser is simply reading them.
Take a link as it leaves the app:
https://www.instagram.com/_window7/p/DS7w7fokujz/?igsh=cXdlbg%3D%3D
| Part | Value | Meaning |
|---|---|---|
| Scheme | https:// |
The protocol; optional in input, always present in output |
| Host | www.instagram.com |
The www subdomain is optional, and the instagr.am and ig.me companion domains parse identically |
| Route | /_window7/p/DS7w7fokujz/ |
The verb (p) names the content type; DS7w7fokujz is the shortcode |
| Query | ?igsh=cXdlbg%3D%3D |
The tracking tail — share fingerprints appended at copy time |
The route verb
The first path segment after the host names what the link is, and the parser maps each verb to a kind:
| Verb | Kind |
|---|---|
p/ |
Post |
reel/, reels/ |
Reel |
tv/ |
IGTV |
{username}/p/, {username}/reel/, {username}/tv/ |
The same media — a link copied from a profile page, not a profile itself |
stories/, guide/, explore/, direct/, s/ |
Story, guide, tag/location/search, direct message, short link |
The shortcode
The last part of a media route is the shortcode: an 11-character string like DS7w7fokujz. It is not random — Instagram writes the media's numeric ID in base-64url, using an alphabet of 64 characters (A–Z, a–z, 0–9, -, _). Eleven characters give 64^11 ≈ 2^66 possible values, room for every media ID Instagram will ever issue. The parser converts in both directions — shortcode to ID (DIPPWkUh7Rj → 3607169348072354915) and ID back to shortcode — with BigInt arithmetic, because real media IDs exceed JavaScript's safe integer range.
The tracking tail
Share parameters — igsh, igshid, utm_* — hang off the end of the query string and fingerprint how the link was copied. They are safe to remove, and removing them is the parser's core job; the mechanics come next.
How It Works
Cleaning an Instagram URL is a four-step pipeline, all of it string parsing running locally.
- Route recognition — the tool matches the URL against the routes Instagram produces. Media uses shortcode paths (
p/,reel/,reels/,tv/), and the same media paths also appear behind a username prefix ({username}/p/{sc}/,{username}/reel/{sc}/) on links copied from a profile page — the parser treats those as the same media kind, not as profile pages. Profiles use/username/, stories use/stories/{username}/{id}/and/stories/highlights/{id}/, guides use/guide/{username}/{id}/, the tag and location browsers live under/explore/tags/and/explore/locations/, and direct messages live under/direct/t/{id}/. A bare 11-character shortcode is accepted on its own, which is handy when you are pulling IDs out of an API response. - Embed normalisation — media URLs sometimes arrive through
/embedor/embed/captioned/. The tool treats those as aliases of the post and folds them back to the canonicalp/{shortcode}/path without a separate result type, so a share pasted from an embed widget still reads as an ordinary post. - Media ID decoding — the tool walks the shortcode's characters against the base-64url alphabet and folds them into a single integer with
BigIntprecision, returning an exact decimal string — no rounding, no loss. - Tracking removal — the query string is inspected for share parameters (
igsh,igshid) and campaign tags (utm_*). Each one found is recorded by name in the Removed params row and then dropped, so the clean URL carries only what affects playback: nothing else.
None of this touches the network. The tool makes no requests — not even a lightweight oEmbed probe. The pasted URL is parsed, split, and rebuilt entirely in the browser, so there is nothing to leak, log, or quota.
What counts as tracking
Instagram's share flow attaches a small fingerprint of how a link was copied. The tool knows each one:
igsh— share hash; tags the device and sharing source of the copy, replacing the olderigshidparameterigshid— the legacy share hash, still produced by some older app versionsutm_source/utm_medium/utm_campaign/utm_term/utm_content— Google Analytics campaign tags sometimes appended by web sharing
All of them are safe to delete. They carry no playback or routing meaning, and the tool reports each stripped name so you can see the verdict per parameter.
When a link arrives wrapped in an l.instagram.com share wrapper, the same cleaning applies to the destination itself: the wrapped target's own share fingerprints — YouTube's si, feature, pp, and ab_channel, or Facebook's fbclid — are removed along with any Instagram parameters, so the unwrapped output is clean on both layers.
Supported Link Formats
The input accepts every address Instagram itself hands out. Each one resolves to one of the kinds below:
| Format | Example | Result |
|---|---|---|
| Post | instagram.com/p/DIPPWkUh7Rj/ |
Shortcode, media ID |
| Reel | instagram.com/reel/DIPPWkUh7Rj/ |
Shortcode, media ID |
| Reels display | instagram.com/reels/DIPPWkUh7Rj/ |
Shortcode, media ID |
| IGTV | instagram.com/tv/DIPPWkUh7Rj/ |
Shortcode, media ID |
| Embed alias | instagram.com/p/DIPPWkUh7Rj/embed/captioned/ |
Shortcode, media ID |
| Bare shortcode | DIPPWkUh7Rj (11 chars) |
Shortcode, media ID |
| Username-prefixed post | instagram.com/_window7/p/DS7w7fokujz/ |
Username, shortcode |
| Username-prefixed reel | instagram.com/_window7/reel/DPdpzY6kxxc/ |
Username, shortcode |
| Profile | instagram.com/some_user.123/ |
Username |
| Story | instagram.com/stories/some_user/1234567/ |
Username, story ID |
| Highlight | instagram.com/stories/highlights/1798abc/ |
Highlight ID |
| Guide | instagram.com/guide/some_user/93711/ |
Username, guide ID |
| Hashtag | instagram.com/explore/tags/photography/ |
Hashtag |
| Location | instagram.com/explore/locations/465487/ |
Location ID |
| Link wrapper | l.instagram.com/?u=…&e=… |
Wrapped target |
| Short domain | instagr.am/p/DIPPWkUh7Rj/ |
Shortcode, media ID |
| Direct link | ig.me/m/414231852796565/ |
Thread ID |
| Keyword search | instagram.com/explore/search/keyword/?q=cats |
Search query |
| Direct message thread | instagram.com/direct/t/414231852796565/ |
Thread ID |
| New short link scheme | instagram.com/s/app/TOKEN/ |
App, token |
A bare 11-character shortcode is accepted on its own, which is useful when you are working from an API response or a spreadsheet of IDs rather than a share link. The https:// prefix and the www subdomain are both optional — instagram.com/p/…, www.instagram.com/p/…, and https://www.instagram.com/p/… parse identically, and the output always uses the full canonical form. Media aliases — embed and captioned embed — are normalised back to the post kind rather than surfaced as separate types. The username-prefixed variants ({username}/p/, {username}/reel/, {username}/tv/) are links copied from inside a profile page: they point at the same media and resolve to the same kind — and the same clean URL — as their unprefixed forms, so the same post never parses as a profile. Hashtags, locations, and direct message threads are recognised as their own kinds and produce canonical explore or direct links, while stories, highlights, guides, and keyword searches have no public permalink and therefore output their original URL with the tracking parameters removed.
Two companion domains work exactly like instagram.com: instagr.am (Instagram's original short domain, still used by old shares) routes identically, so instagr.am/p/… resolves to the same post kind as its long-domain twin, and ig.me (the direct-link domain) maps ig.me/m/{id} to a direct message thread and ig.me/u/{username} to a profile. A different case is the share wrapper l.instagram.com/?u=…&e=… — the address Instagram hands out when a link is shared out of the app or a bio link. The parser unwraps it: if the u parameter points at Instagram content the result is that content (a wrapped post parses as a post with its full details), and if it points at an external site the type reads redirect with the wrapped address shown as the detail. The output is always the unwrapped destination itself.
Usage
The tool parses as you type — there is no button to press:
- Paste an Instagram link — anything from the formats above, or type a bare 11-character shortcode.
- Read the result panel — the link type, username, shortcode, numeric media ID, and detail fields appear as you type, updated on every keystroke.
- Review the removed-parameter row — every tracking parameter Instagram appended is listed by name so the cleanup is auditable.
- Copy the result — the canonical URL appears in the output field, ready to copy.
The result panel also lists which parameters were stripped, so the cleanup is auditable: you see igsh and utm_source removed, not just a shorter URL.
Output formats
For media links — posts, reels, and IGTV — the output field offers up to four formats, each with its own address shape:
| Format | URL | Available when |
|---|---|---|
| Post URL (default) | instagram.com/p/{shortcode}/ |
Always — the universal form that renders any media |
| Reels URL | instagram.com/reels/{shortcode}/ |
Only when the input is a /reel/ or /reels/ link |
| Embed URL | instagram.com/{p|reel|tv}/{sc}/embed/ |
Always |
| Captioned embed | instagram.com/{p|reel|tv}/{sc}/embed/captioned/ |
Always |
The Reels URL is offered only when the link arrived as a reel — /reel/ or /reels/, with or without a username prefix — because those routes guarantee the media is a reel. A /p/ link can hide a reel behind its post form, but it can also be an ordinary post, and there is no way to tell from the URL alone; producing a /reels/ link for non-reel media sends the visitor to the reels browser instead of the post, which is worse than a broken link. When the type is uncertain the option is simply not shown, and any selected reels output resets to the post form.
The embed forms keep the path verb the link arrived with — a /reel/ link embeds as /reel/{sc}/embed/, a /p/ link as /p/{sc}/embed/ — because Instagram serves each verb's embed endpoint separately and /reels/{sc}/embed/ does not exist. Format selection only appears for media links; profiles, tags, locations, and direct message threads have a single canonical form, and stories, highlights, and guides output their tracking-free original URL.
Tutorial
Walk one noisy share link from copy to clean URL.
Step 1 — Get a noisy link. Open Instagram, find a post, tap Share, and copy the link. It looks something like https://www.instagram.com/p/DIPPWkUh7Rj/?utm_source=ig_web_copy_link&igshid=YzMyNjBhcA%3D%3D&igsh=cXdlbg%3D%3D. Two share parameters are already glued on.
Step 2 — Paste it. Click the input and paste (Ctrl+V or Cmd+V). The result panel fills in immediately: type post, shortcode DIPPWkUh7Rj, media ID 3607169348072354915, and the stripped-parameter row shows utm_source, igshid, igsh.
Step 3 — Read the media ID. The Media ID row shows 3607169348072354915. That is the integer Instagram's own APIs use for this post, decoded locally from the shortcode with no network round-trip. Paste any 11-character shortcode here and you get its numeric twin instantly.
Step 4 — Copy the clean post URL. The output field now reads https://www.instagram.com/p/DIPPWkUh7Rj/ — the same post, no fingerprint. Copy it to forward to someone, drop it in a document, or paste it into a link archive without leaving a share trail behind.
Step 5 — Try a Reel. Paste https://www.instagram.com/reel/DIPPWkUh7Rj/?igsh=gCXI. The type reads reel, the shortcode and media ID come through the same way, and the output defaults to the universal post form instagram.com/p/DIPPWkUh7Rj/. Because the input route guarantees this is a reel, the Reels URL option is available — switch to it and the output becomes instagram.com/reels/DIPPWkUh7Rj/. Switch to Embed URL and you get instagram.com/reel/DIPPWkUh7Rj/embed/, ready for an iframe.
Step 6 — Try a bare shortcode. Working from a spreadsheet of IDs? Type the 11 characters on their own — DIPPWkUh7Rj — and the tool treats it as a full post link, complete with media ID and canonical URL.
Step 7 — Unwrap a share wrapper. Paste a bio link: https://l.instagram.com/?u=https%3A%2F%2Fwww.instagram.com%2Fp%2FDIPPWkUh7Rj%2F%3Figsh%3Dabc&e=AUD-…. The wrapper opens: the type reads post with the full shortcode and media ID, the removed list shows igsh, and the output is the canonical https://www.instagram.com/p/DIPPWkUh7Rj/. Now paste a wrapper pointing at an external site — ?u=…youtube.com/@hello_lucy?si=…&fbclid=… — and the type reads redirect, the detail shows the wrapped destination, and the output is that destination with its own si and fbclid fingerprints removed.
Pro Tips
- Strip every share before forwarding. The parameters Instagram appends (
igsh,igshid,utm_*) fingerprint the share event, not the content. Running every link through the parser is a two-second habit that removes them every time. - Use the media ID to cross-reference datasets. If you have an export of media IDs — from a data download, a backup, or another API — paste a shortcode here, copy the media ID, and search your records for an exact match. The decoder uses
BigInt, so large Reel IDs are exact. - Treat reels, posts, and embeds as one. A
/reel/, a/p/, and a/p/embed/captioned/all resolve to the same media ID and the same canonical URL. Paste whichever flavour you received and get one consistent answer. - Unwrap bio links before logging them.
l.instagram.com/?u=…wrappers hide their destination behind a URL-encoded parameter and carry their own expiry token. Running one through the parser yields the actual address — Instagram content resolves to its canonical form, external links are shown as redirect and cleaned of their own share fingerprints. - Stories and highlights are not permalinks. They have no canonical URL, so the parser reports them as story/highlight and outputs the original link with the share parameters stripped instead — a shareable address that still points at the right place.
- Audit a link archive in bulk. Because parsing is instant and local, a hundred pastes take about as long as a hundred keystrokes, and the removed-parameter row records per-link how much tracking each one carried.
Alternatives
How do people usually inspect an Instagram link? The table fills out the options:
| Method | Shows link type | Decodes media ID | Removes share params | Uploads your link |
|---|---|---|---|---|
| Copy and forward | No | No | No | No |
| Manual inspection | Yes, by eye | No (manual) | Yes, by hand | No |
| Instagram embed generator | Yes, for media only | No | No | Yes |
| Third-party link shorteners | No | No | No | Yes |
| This tool | Yes, structured | Yes, with BigInt | Yes, listed visibly | No |
Manual inspection works but is exacting: igsh, igshid, and utm_source look alike, and decoding the base-64url media ID by hand is a job for a calculator. Instagram's own embed generator only handles media, needs a network round-trip, and sends the URL home to produce the embed code. Third-party shorteners replace Instagram's tracking with their own redirect and upload the URL to their server. This tool is the only row with zero upload and a structured breakdown, and it surfaces what it removed instead of silently rewriting.
Against the Official APIs
The parser's zero-request design is a deliberate trade-off, and the other side of the trade is worth naming. The Instagram surfaces that do answer richer questions about a piece of media are oEmbed and the Instagram Graph API — and the table shows where each path wins:
| Capability | oEmbed | Graph API | This tool |
|---|---|---|---|
| Split a URL into components | No | No | Yes, locally and instantly |
| Remove share parameters with an audit list | No | No | Yes, visibly reported |
| Convert embeds back to the canonical address | No | No | Yes |
| Decode shortcode to numeric media ID | No | No | Yes, with BigInt precision |
| Encode numeric media ID back to shortcode | No | No | Yes |
| Caption, view count, owner name | Yes | Yes | Not available |
| Region and access checks | No | Yes | Not available |
| API key / login needed | Token | Yes | None — zero requests |
oEmbed answers what is this media called, in one call that still needs a token; the Graph API answers everything, at the price of a token, a login, and a quota; this tool answers what is in this link, with no request at all. The three do not compete — URL parsing is a browser job, metadata is a network job. If a workflow needs both, run the parser for the URL and call the Graph API for the caption: each one does its own job without the other's cost.
What It Doesn't Do
Honesty about the limits is part of what makes a parser trustworthy.
- It does not fetch the media. No thumbnail requests, no player loading, no reel resolution, no analytics beacons. Parsing is pure local string work.
- It does not resolve a username to a profile ID.
some_userstays a username. Resolution needs the Instagram Graph API and a login token, which this tool deliberately never calls. - It does not show captions, view counts, or owner names. Those come from oEmbed or the Graph API — both network calls. The tool's zero-request design trades enrichment for privacy.
- It does not verify the media exists. A valid 11-character shortcode parses cleanly whether the post is live, removed, or never existed. Confirming existence would require a network call.
Everything that makes the parser useful — splitting, decoding, cleaning, converting — is local. Everything that needs the network is a separate service, and the trade-off is documented here rather than hidden.
Troubleshooting
| Problem | Cause | Solution |
|---|---|---|
| Pasting does nothing | The text is not an Instagram URL format at all | Use a link from the app or web, or a bare 11-character media shortcode |
| The clean URL keeps the original path | The link kind has no public permalink | Stories, highlights, and guides output their tracking-free original URL instead of a canonical form |
| The media ID row is blank | The URL is not a media kind (no shortcode) | Media IDs are only shown for posts, reels, and IGTV; profiles and tags have none |
| The Reels URL option is missing | The link does not guarantee the media is a reel | /p/, /tv/, and bare shortcodes can be ordinary posts; the reels output is only offered for /reel/ and /reels/ links to avoid sending visitors to the wrong content |
| A tracking parameter still appears in the output | It is a semantic parameter, not a tracker | igsh, igshid, and utm_* are the trackers removed; route parameters are left as-is |
| Two shortcodes look different | They point to different posts | Decode both to their media IDs — identical IDs mean identical posts |
Privacy & Data Handling
The parser follows the strictest privacy model of the Toollect tools: it makes no network requests at all.
- Nothing is uploaded. The URL is parsed in your browser. No request containing it is ever sent — not to a server, not to Instagram's API, not to an analytics beacon.
- No account, no tracking. There is no login, no analytics, and no history of the links you paste.
- Nothing is stored. The tool keeps no state between visits; close the tab and the pasted URL is gone.
- No third-party scripts. Unlike tools that load embed or share widgets, this page runs entirely on its own code.
If privacy is why you are here: this is the page where you can paste the link you would not paste anywhere else.
Technical Specs
Details:
- Input formats: post, reel, reels, IGTV, embed/captioned aliases, bare 11-char shortcode, profile, story, highlight, guide, hashtag, location, keyword search, direct message thread, new short-link scheme,
instagr.amandig.meshort domains,l.instagram.com/?u=…share wrappers;https://and thewwwsubdomain are optional - Share parameters removed:
igsh,igshid,utm_source,utm_medium,utm_campaign,utm_term,utm_content; when unwrappingl.instagram.comlinks, the wrapped target's own share fingerprints (si,feature,pp,ab_channel,fbclid) are removed too - Media ID decoding: base-64url against the Instagram alphabet (
A–Z a–z 0-9 - _) usingBigIntarithmetic, returned as a decimal string; reversible to shortcode - Output: for media,
instagram.com/p/{shortcode}/(post),instagram.com/reels/{shortcode}/(reels display),instagram.com/{p|reel|tv}/{shortcode}/embed/and/embed/captioned/(embed forms, keeping the input verb); for others,instagram.com/{username}/,instagram.com/explore/tags/{tag}/,instagram.com/explore/locations/{id}/, orinstagram.com/direct/t/{id}/ - Processing: 100% client-side JavaScript with zero network requests, no API key, no server
- Browser support: all modern browsers (BigInt, URLSearchParams, clipboard API)
Features
- Splits Instagram posts, reels, IGTV, profiles, stories, guides, hashtags, locations, and direct messages into their component parts
- Decodes the 11-character shortcode into its numeric media ID with BigInt precision and re-encodes it back
- Removes share-tracking parameters such as igsh, igshid, and utm_* while listing exactly what was stripped
- Generates canonical, fingerprint-free links for posts, profiles, tags, locations, and direct message threads
- Normalises embed and /embed/captioned/ variants back to the standard post URL
- Unwraps l.instagram.com share wrappers down to the wrapped destination, cleaning its share fingerprints too
- Recognises the instagr.am and ig.me companion short domains
- Accepts a bare shortcode on its own, handy for IDs pulled from APIs or spreadsheets
- Accepts links with or without the https:// prefix and the www subdomain
- 100% client-side JavaScript with zero network requests, no API key, and nothing uploaded