Skip to content
ZeroServer.tools

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

URLAnchor textType
/Homerelative
/aboutAboutrelative
https://example.com/docsDocumentationabsolute
https://blog.example.comblogabsolute
/files/report.pdfreport (PDF)relative
mailto:[email protected]Contact usmailto
tel:+15555555555Call ustel
#section-2Jump to section 2anchor
//cdn.example.com/asset.jsCDN scriptprotocol-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

Private & free — this tool runs entirely in your browser.

NamecheapRegister a domain for your next project — from $1.98/yr.affiliate