Skip to the tool
URLExtractor

HTML URL Extractor

Paste markup — a saved page, a "view source" copy, an email template — and get every link with its href, the text a reader actually sees, and its rel and target attributes.

You provide
Pasted HTML source, or a local .html file.
You receive
Each link with its href, visible anchor text, rel and target — plus image and media references if you ask for them.
Use it when
Use it when you already have the markup rather than a live address.

The address this markup came from. Without it, relative links such as /about are listed as unresolved — we will not invent a domain for them. A <base href> inside the markup is used if you leave this empty.

Drag a file here, or

HTML or HTM files · up to 12 MB

The markup is parsed inert in this browser tab. Scripts never run and no images or stylesheets are requested.

Paste markup on the left. Try Load example to see anchor text, rel values, srcset candidates and an unsafe scheme all handled.

What this tool cannot do

  • Relative links such as /about cannot be resolved without a base URL. We mark them unresolved rather than guessing a domain.
  • Nothing is executed. Links that a page only creates once JavaScript runs are not in the markup and cannot be found here.
  • External stylesheets are not fetched, so images referenced only from a .css file are not listed.
  • Documents are read up to 20,000 rows, then truncation is reported.

Parsed, not pattern-matched

Markup is parsed into a real document tree before anything is read out of it. That matters for two reasons.

The first is correctness. HTML entities are decoded by the parser, which is the only reliable way to do it — &amp; inside a query string, &#x2F; in a path, and the several dozen other named entities all come out right without a lookup table of our own. Attribute quoting, whitespace and unusual-but-legal markup are handled the same way a browser handles them.

The second is safety. The document is built inert: it has no browsing context, so scripts never run, and no image, stylesheet or iframe is ever requested. Pasting markup from a page you do not trust cannot cause this tool to contact that page's server.

Base URLs, and why we will not guess

A link written as /about means "the /about path on whatever site this document came from". If we do not know the site, we cannot turn that into a full address — and inventing one would be worse than useless, because it would look right.

So: enter the address the markup came from in the Base URL box and relative links resolve against it. If the markup contains its own <base href>, that is used when you leave the box empty. With neither, relative links are listed with their original text and a note saying they could not be resolved.

What each option reads
OptionElements and attributes
Links`a[href]`, `area[href]` — plus the visible text, `rel` and `target`
Image references`img[src]`, every candidate in `img[srcset]`, `picture > source[srcset]`, and the lazy attributes `data-src`, `data-original`, `data-lazy-src`, `data-lazy`, `data-srcset`, `data-original-set`
Media and frames`iframe`, `video`, `audio`, `source`, `embed`, `track`, `object[data]`, `video[poster]`
Stylesheets and scripts`link[href]`, `script[src]`, `form[action]`
Inline CSS`url(...)` inside `style` attributes and `<style>` blocks

srcset is parsed properly

A srcset attribute cannot be split on commas: a data: URL or a CDN path such as /img,w_400/x.jpg contains commas of its own, and splitting there tears the address apart. This tool follows the parsing rules in the HTML specification — the URL runs until whitespace, then the descriptor runs until a comma — so each candidate comes out whole, with its width or density descriptor in its own column.

URL Extractor from WebsiteHave an address rather than markup? Fetch the page instead.

Frequently asked questions

Can I paste markup from a page I do not control?

Yes. The document is parsed inert, so nothing in it runs and nothing it references is fetched. The markup is also never sent to our server — parsing happens in your browser.

Why do some rows have no anchor text?

Because the link has none — it may wrap an image, or an icon. Those rows are marked rather than being given invented text. If the link wraps an image, turn on image references and you will see the image address on its own row.

The page I saved has links that are not showing up.

The most likely cause is that those links are built by JavaScript after the page loads, so they are not in the saved markup at all. Open the page in a browser, use the developer tools to copy the rendered HTML (right-click the html element, Copy → Copy outerHTML), and paste that instead.

Related tools

Guides for this tool

Share this pageWhatsAppXLinkedInFacebook