Skip to main content

HTML Link Extractor

API reference

Extract every link from pasted HTML with its anchor text, rel attribute and internal/external type. Resolve relative URLs against a base URL, filter, and de-duplicate.

Resolves relative links to full URLs and lets the tool tell internal links from external ones.

Links
URLAnchor textTypeRel
No data yet
URLs only
Was this helpful?

More ways to use this tool

REST API

curl -X POST https://api.iotools.cloud/v1/tool/html-link-extractor \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "htmlSource": "<nav>\n  <a href=\"/\">Home</a>\n  <a href=\"/pricing…",
    "baseUrl": "https://example.com",
    "filter": "all",
    "unique": "true"
  }'

Swap in your own key from your account. The tool's fields are the body — no wrapper.

Ask an AI agent

Use the IOTools `html-link-extractor` tool (HTML Link Extractor) on this input:

YOUR_INPUT_HERE

Paste this at any agent connected to the IOTools MCP server, then add your input.

Embed widget

<iframe
  src="https://iotools.cloud/embed/html-link-extractor/"
  width="100%" height="520" frameborder="0" scrolling="no" loading="lazy"
  title="HTML Link Extractor — iotools.cloud"
  sandbox="allow-scripts allow-forms allow-same-origin allow-downloads allow-popups allow-popups-to-escape-sandbox"
  allow="clipboard-write"
  style="width:100%;border:1px solid #e5e7eb;border-radius:12px;overflow:hidden"></iframe>
<script src="https://iotools.cloud/embed.js" async></script>

Drop this into your own page — free, no key required, just a link back.

Cost per API/MCP callFrom 5 credits
Need more credits?View pricing

Also available with

Guides

The HTML Link Extractor pulls every hyperlink out of an HTML document and lists it with its anchor text, rel attribute and type — internal, external, mailto:, tel: or in-page anchor. It runs entirely in your browser, so the HTML you paste is never uploaded.

How to use this tool

  1. Paste an HTML document or fragment.
  2. Optionally enter a Base URL (e.g. https://example.com). Relative links such as /pricing/ are resolved to full URLs, and links are classified as internal or external against that origin. Without a base URL, relative links are kept as written and treated as internal.
  3. Choose what to show: all links, internal only, external only, or nofollow links only.
  4. Leave Remove duplicate URLs on to list each destination once, or turn it off to see every occurrence.
  5. Copy or download the table (CSV) or the plain URL list.

Anchors with no href and javascript: links are skipped; links inside comments, <script> and <style> blocks are ignored; tags inside the anchor text are stripped and entities decoded.

Common uses

  • Link audits — see every outbound link on a page and which ones carry nofollow.
  • Internal linking review — filter to internal links to check navigation and cross-linking.
  • Migration checks — extract all URLs from an old page to build a redirect map.
  • Scraping helpers — turn a saved page into a plain list of URLs to feed into another tool.
hrefanchora tagurlsbacklinksnofollowinternal linksexternal linksscraper

Love the tools? Lose the ads.

One payment clears every ad from your account, for good. No subscription, no tracking.