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.
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 — & inside a query string, / 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.
| Option | Elements 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.
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
- You provide:
- A public page address. Choose single page, or a bounded same-site crawl.
- You receive:
- Source page, destination, anchor text, internal/external label, and any rel="nofollow", ugc or sponsored values.
- Use it when:
- Use it to audit the links on a page, or to collect the linked URLs across a small, defined part of a site.
- You provide:
- A public page address, or pasted HTML.
- You receive:
- Each image address with the attribute it came from, its width descriptor where srcset provides one, and its alt text.
- Use it when:
- Use it to inventory the images on a page, check which sizes are being offered, or collect asset URLs before a migration.
- You provide:
- Pasted text, or a local TXT, CSV, JSON or Markdown file.
- You receive:
- Every web address found, with its line number, in the order it appeared.
- Use it when:
- Use it when the links are sitting inside prose, an email, a chat log, a notes file or a data export.
- You provide:
- A list of URLs, one per line.
- You receive:
- The cleaned list, with a before/after view of every address that changed.
- Use it when:
- Use it before sharing links, publishing a reference list, or importing URLs that would otherwise carry campaign parameters.
Guides for this tool
- How to Extract and Copy Links in ChromeWhat Chrome can do on its own, a bookmarklet you can read before you use it, and an honest look at when an extension is worth the permissions it asks for.
- How to Extract Webpage Links with JavaScriptTwo lines in the browser console give you every link on the page — including the ones built by JavaScript that a crawler cannot see. Plus how to get anchor text, rel values and a downloadable file.
- How to Extract Links from a Website or a Single PageWhen to fetch one page, when to crawl, how to set a scope that finishes, and what a crawler structurally cannot find — including the pages it will always miss.