Link Extractor
Extract all hyperlinks from HTML — see each href, anchor text, and link type.
Total Links: 0Filtered Count: 0Display Format: table
0 links found
| URL | Anchor text | Type |
|---|---|---|
| / | Home | relative |
| /about | About | relative |
| https://example.com/docs | Documentation | absolute |
| https://blog.example.com | blog | absolute |
| /files/report.pdf | report (PDF) | relative |
| mailto:[email protected] | Contact us | mailto |
| tel:+15555555555 | Call us | tel |
| #section-2 | Jump to section 2 | anchor |
| //cdn.example.com/asset.js | CDN script | protocol-relative |
How link extraction works
The extractor scans the HTML for <a href="…"> tags using a regex tokenizer (no DOMParser — fully SSR-safe). It classifies each link: absolute (https://…), relative (/path), anchor (#id), protocol-relative (//…), mailto:, or tel:. Anchor text is extracted by stripping any nested HTML tags.
To encode or decode the extracted URLs use the URL Encoder. To parse a specific URL into its parts, try URL Parser. To audit your page's meta tags, see Meta Tag Analyzer.
Built and maintained by Meet Shah · Last updated
What this tool is used for
- Pulling every link out of a page to audit them.
- Separating internal from external links in a document.
- Finding mailto and telephone links that expose contact details.
- Extracting a link list to feed into a checker.
- Auditing anchor text across a page for accessibility.
Frequently Asked Questions
- What kinds of link does it distinguish?
- Absolute, relative, protocol-relative, anchor-only, `mailto:` and `tel:` — classified separately because they behave differently for crawling, and lumping them together hides the ones you usually want to audit.
- What is a protocol-relative URL?
- One starting `//host/path`, which inherits the current page's scheme. It made sense when sites straddled HTTP and HTTPS; today it is a liability, since it silently loads over HTTP if the page ever does.
- Why does the anchor text matter?
- Because it is what both search engines and screen-reader users rely on to know where a link goes. A page full of "click here" is a genuine accessibility problem — screen readers can list links out of context.
- Does it follow the links?
- No, it extracts them from the markup you supply. Nothing is fetched, so a listed URL has not been checked for a 200 — that is a separate step, and a link checker is the tool for it.
- Are rel attributes reported?
- The extracted markup preserves them, which matters because `nofollow`, `sponsored` and `ugc` change how a link is treated, and `noopener` on a `target="_blank"` link is a security requirement rather than a nicety.
- Will it find links added by JavaScript?
- Only if they are in the HTML you paste. Links a framework renders at runtime are absent from the served source, so paste from the browser's inspected DOM rather than View Source when auditing an app.
Common errors and gotchas
- Extracting from source rather than rendered output, so JavaScript-added links are missed.
- Treating a relative link as broken, when it resolves against a base you have not applied.
- Overlooking a base tag, which changes what every relative link resolves to.
- Ignoring links inside comments or scripts, which are not real links.
- Assuming extracted links work, since only fetching them establishes that.
Related Web & SEO tools
Meta Tag Generator
Build SEO title, description, and viewport meta tags.
Open Graph Generator
Generate Open Graph and Twitter Card meta tags.
Robots.txt Generator
Build a robots.txt file with per-bot rules. Block AI crawlers, set crawl delays, define sitemaps.
UTM Campaign URL Builder
Append UTM parameters to build trackable campaign URLs.
Hreflang Tag Generator
Generate hreflang link tags for multilingual SEO.
Sitemap XML Generator
Build an XML sitemap from a list of URLs.
SERP Snippet Preview
Preview how your page title and meta description appear in Google search.
Meta Tag Analyzer
Paste a page's HTML head to audit its title, meta, and social tags.