HTML link extractor
Use the tokenizer to list `href` / `src` / `srcset` / `action` / `poster` / `cite` and `data-*` URLs in one pass; quoted, unquoted and entity-encoded attributes all parse (so `href=a&b` is not missed), srcset splits on commas into candidates, with switches for de-duplication and links-only or media-only scope.
Runs in your browserEvery computation happens in your browser — your data never leaves this device.
Result
The result can be copied directly.
Paste HTML to see the URL list
Characters: 0 · Lines: 0 · URLs found: 0 · After de-dup: 0
What this tool does
- Collect asset URLs for a downloader or link checker.
- Check which candidates a `srcset` really declares so responsive images are complete.
- Audit external hosts in a template fragment for a dependency inventory.
Example
Input
<a href="/a">A</a><img src="x.png" srcset="a.png 1x, b.png 2x">
Output
href /a src x.png srcset a.png srcset b.png
URLs come from a whitelist of attribute names; srcset is split on commas into separate rows.
Frequently asked questions
What would a regex version miss?
Unquoted attributes such as `href=a&b`, quoted values containing quotes, and entity-encoded URLs. The tokenizer handles all of them.
How is `srcset` handled?
It splits on commas and takes the first whitespace-separated token of each part, so `a.png 1x, b.png 2x` yields two srcset rows.
Are all `data-*` attributes collected?
Only the whitelisted `data-url` / `data-src` / `data-href`; other data attributes may be business data and are not listed.
Does it read URLs inside CSS or JS?
No. Only HTML attributes are parsed; strings in inline scripts and styles are out of scope.
Keywords:htmlgetlinksrcsetextract linksdeveloper