To get a link to an Instagram account, you either copy the profile URL directly from the Instagram app or browser, or pull the URL out of an HTML page source when the account is referenced but not shown as a plain address. Every Instagram profile, post, reel, and story has a stable web address, and the same instagram.com/username pattern applies across the app and the web. The simplest path is built in: open the profile, use the share or copy-profile option, or read the URL from the address bar of a desktop browser. The second path is for situations where the Instagram account is mentioned on a third-party webpage such as a press kit, sponsor wall, byline, footer, or product page. In those cases the URL sits inside the page source as an anchor tag, and a local HTML parser is the most reliable way to surface every Instagram host entry without manually scrolling through markup.

Two main routes to an Instagram account URL
Before reaching for a parser, it helps to match the situation to the right method. The table below compares the built-in Instagram route against source-level extraction, so you can pick the one that fits how the link is presented.
| Situation | Best method | What you get |
|---|---|---|
| You control the profile and want to share it | In-app "Copy Profile URL" or browser address bar | A single canonical instagram.com/username link |
| Someone else's profile shown on a webpage you can view | Browser address bar after navigating to the profile | The same canonical link, copied once |
| An Instagram handle is mentioned in a webpage's source but not displayed as a full URL | Extract href values from the page HTML with Link Extractor | Every Instagram host target present in the markup, deduplicated |
| Many Instagram references scattered across one page (sponsor list, author bios) | Parse the page source so you can review them in one place | An ordered, deduplicated list with skipped-count transparency |
Built-in Instagram copy methods
When the Instagram account is one you can open directly, the platform gives you the URL in three places. In the mobile app, open your profile, tap the three-dot menu in the top corner, and choose "Copy Profile URL." On the desktop web version, navigate to instagram.com/username and read the address bar. Some accounts also expose a "Share profile" option inside the same menu that produces the same canonical URL. The format is always https://www.instagram.com/{username} for users, with extra path segments for posts (/p/{id}), reels (/reel/{id}), and tagged locations. If you only have the handle and no link, typing instagram.com/handle into any browser resolves to the same profile, and copying that address gives you the same result as the in-app copy option.
When the Instagram link lives in someone else's HTML
Pages built by other people often mention Instagram accounts without showing the full URL. A footer might say "Follow us @brandname" with the actual anchor pointing to https://www.instagram.com/brandname. A press kit might list three influencer handles next to portrait photos, each one stored as a separate anchor in the markup. A guest author byline on a blog post might link the author's display name to their profile. Reading the rendered page gives you the visible text but not necessarily the destination. To recover every Instagram host entry, you need the underlying HTML and a parser that walks the anchor tags.
Link Extractor is designed exactly for this. It takes pasted HTML source and returns a deduplicated list of every href value it can read, locally and without ever fetching the URLs it discovers. That last point matters: the tool never visits instagram.com or anywhere else, so the audit stays private and you stay in control of where requests go.
Extract an Instagram account link from HTML
The following steps walk through pulling every Instagram host entry from a page's source. Use only on pages you are authorized to inspect.
- Open the page in a desktop browser, right-click and choose "View page source" (or open the browser's developer tools and copy the outer HTML). Save or copy the entire source as plain text.
- Open Link Extractor and paste the copied HTML into the input area. The tool caps input at 200,000 characters, so very large pages should be split.
- If the source contains relative paths such as /brandname or ../instagram.html, paste the page's full absolute URL into the optional base URL field. The base must be HTTP or HTTPS and cannot carry credentials, otherwise the resolver will reject it.
- Run the extraction. The result panel shows a one-URL-per-line list along with three counts: unique targets kept, duplicates removed, and skipped values (executable schemes, empty hrefs, same-page fragments, and invalid URLs).
- Copy the resulting list into a text editor or spreadsheet and filter for instagram.com. Each entry is a candidate Instagram profile, post, or reel reference present in the source.
What the parser keeps and what it filters
The parser scans a, area, and link start tags for href attributes, so it picks up plain anchors, image-map hotspots, and document-level references such as stylesheet or canonical link elements. After extraction, it normalizes absolute HTTP, HTTPS, mailto, and tel targets, resolves any relative paths against the supplied base, and deduplicates results while keeping the first-seen order. Several categories are deliberately skipped, and the skipped count makes that filtering visible.
| Category | Treatment in the result |
|---|---|
| Absolute http(s) URLs to instagram.com | Returned, normalized, deduplicated |
| Relative paths resolved against a valid HTTP(S) base | Returned as absolute URLs |
| mailto and tel targets | Returned as legitimate link destinations |
| Empty href values and same-page fragments (#section) | Skipped, counted |
| javascript:, data:, vbscript: schemes | Skipped, counted |
| Invalid absolute URLs | Skipped, counted |
| Anchor markup that appears inside script or style blocks | Excluded before scanning so it does not produce false links |
Numeric character references plus the named entities amp, quot, apos, lt, and gt are decoded inside href values, which covers common URL escaping such as & in query strings. Rare named entities are left encoded rather than guessed. Because the parser is a source scanner rather than a full browser HTML tree builder, severely malformed markup can produce a slightly different result than a real DOM. If the audit is critical, compare the extraction against the live DOM and a real crawler.
Why a base URL matters for Instagram extraction
Many site templates reference social profiles with relative paths so the same code works under any host. A press kit hosted at https://example.com/press/ might store the Instagram reference as /instagram/brandname or ../social/brand. Without a base URL, those entries remain relative and you cannot tell which host they actually point to. Adding the page's absolute URL tells the resolver to turn /instagram/brandname into https://example.com/instagram/brandname, which is still not instagram.com, so the filter for the instagram.com host is what actually identifies the right entries. When the source already uses absolute Instagram URLs, no base is needed and the relative entries will simply pass through unchanged.
Limits and what to verify after extraction
Link Extractor does not request any of the URLs it returns, so it cannot tell you which ones resolve, redirect, return errors, or require authentication. A target listed in the result may be a 404, behind a login, intentionally off-site, or simply stale. Use the output as an inventory, then point a separate authorized crawler or HTTP checker at the entries that matter to you. The same applies to rel attributes: the parser does not decide whether a link is marked nofollow, sponsored, or ugc, and it does not separate internal from external targets. It also cannot see links that JavaScript inserts after the page loads, because those do not exist in the static source you pasted. For a deeper audit of dynamic content, run a real browser export or a controlled crawl in addition to this extraction. For a focused walkthrough on the same workflow with a different social platform, see the guide on extracting links from HTML with a base URL and counts.
If you're weighing options, Anatomy of an HTML Page Weight Analyzer Result covers this in detail.