01What is HTML Link Extractor?
Paste a chunk of HTML, from a full page source down to a single nav bar, and this tool lists every link in it. You get the href of each a element plus its link text, in document order. It doesn't use regular expressions. The HTML goes through the browser's own DOMParser, the same parser that renders real pages, and follows the parsing rules in the WHATWG HTML Living Standard. That pays off on messy markup. Unquoted attributes (href=/about), single quotes, attributes in any order and uppercase tags all work. Character references are decoded too, so ?a=1&b=2 in the source shows up as ?a=1&b=2. The tool then picks every a element that has an href. Anchors without one, like old named anchors, are skipped. Links inside HTML comments are ignored, just as a browser ignores them. Leading and trailing spaces around the href are trimmed. Link text is the element's text with whitespace collapsed to single spaces. If that's empty, it falls back in order to the aria-label, the alt text of an image inside the link, and then the title attribute. When none exist, the row says (no text). A short example. Paste the Navigation sample and you get four rows: https://example.com with Home, https://example.com/about with About Us, https://example.com/contact with Contact, and /blog with Blog. Note that /blog stays relative. Hrefs are shown exactly as written, so mailto: and javascript: links appear as they are. Parsing happens in a detached document. Scripts in the pasted HTML never run and images are never requested, so pasting a page with trackers is safe. The markup stays in your browser tab. Copy All URLs puts every href on its own line, and each row has its own copy button for single links. Duplicates are kept, which is handy when you want to see how often a page links to the same place. What it won't do: it doesn't fetch pages, resolve relative URLs against a base, or check whether links return 200. It also ignores rel, target and nofollow, and it only looks at a elements, not link, area or form actions. For single-page apps, paste the rendered DOM from dev tools, because links added by JavaScript are missing from View Source.
Web developers and SEO folks who need a clean list of every href and its anchor text from a page or email template before checking or auditing them. The tool runs entirely in your browser, so your data never leaves your device.
02How to use HTML Link Extractor
- Copy the HTML source, either from View Source or an element's outerHTML in dev tools
- Paste it into HTML Input, or load the Navigation HTML or Footer Links example
- Read the Extracted Links list, where each row shows the href and its link text
- Click Copy All URLs for a one-per-line list, or use a row's copy button for one link
03Worked examples
- Input:
<a href="/docs">Docs</a> - Result:
/docs → Docs - Relative links are listed exactly as written in the href.
- Input:
<a href="https://github.com/x/y" aria-label="Source on GitHub"><svg></svg></a> - Result:
https://github.com/x/y → Source on GitHub - An icon-only link has no text, so its aria-label is used.
- Input:
<a href="mailto:[email protected]"><img src="m.png" alt="Email us"></a> - Result:
mailto:[email protected] → Email us - For an image link, the image's alt text becomes the link text.
- Input:
<a href="/s?a=1&b=2">Search</a> - Result:
/s?a=1&b=2 → Search - The HTML parser decodes & to & as the HTML standard requires.
- Input:
<a name="top">Top</a><!-- <a href="/old">Old</a> --><a href="/x"></a> - Result:
/x → (no text) - Anchors without href and commented-out links are skipped. Empty links show (no text).
04Common use cases
- Pulling every link out of a page's source so you can feed them to curl or a link checker
- Listing the navigation and footer links of a template to compare against your sitemap
- Extracting links from an HTML email or newsletter to confirm the tracking parameters before it goes out
- Collecting URLs from an exported bookmarks file or an HTML report
- Finding icon-only links with no accessible name, which show up as (no text)
- Checking that a CMS rich-text field didn't mangle hrefs with stray spaces or encoded ampersands
05Tips
- Relative links like /blog are shown as written. Prefix them with the site's origin before checking them from the command line.
- Rows showing (no text) are links with no accessible name, which screen readers announce poorly; add text or an aria-label.
- Paste the rendered DOM (outerHTML from dev tools) rather than View Source for single-page apps, since their links are often added by JavaScript.
- Duplicate hrefs are listed each time they appear; run the copied list through the Duplicate Line Remover for a unique set.
06Related concepts
Link audit, PageRank, nofollow attribute, Anchor text.
Frequently Asked Questions
What is HTML Link Extractor?
HTML Link Extractor is a free, browser-based developer tool on AIDToolStack. Extract all URLs and links from HTML content. It requires no installation or sign-up and works entirely in your browser.
Is HTML Link Extractor free to use?
Yes. No sign-up, no fees and no usage cap.
Does HTML Link Extractor store my data?
No. It runs in your browser; nothing is uploaded.