Extract image URLs, link URLs and matching inner HTML from a pasted fragment

Paste an HTML fragment, or a whole page, and run one of the three modes: list every image src, list every link href, or list the inner HTML of the elements that match a CSS selector (jQuery-compatible selectors, not XPath expressions). Values are returned exactly as written, so a page that uses /images/hero.jpg keeps that relative path.

The fragment is parsed into an inert document inside this browser. Images are not downloaded, inline event handlers do not run, and no request leaves the page even when the markup points at remote hosts.

  1. Paste the HTML into the field above, or press Extract image URLs to start from the example that ships with the page.
  2. Press Extract image URLs or Extract link URLs, or type a CSS selector and press Match CSS selector.
  3. Read the result list: one value per line, in document order. The notes under the box list what was skipped or repeated.
  4. Press Copy result to copy the list to the clipboard, or select the text manually.
  5. Press Clear to empty the input and the result before the next fragment.

What the tool measures, and what it leaves out

How the fragment is parsed

The input goes through the same HTML parser the browser uses for a page. Unclosed tags are repaired, attribute values are decoded (<img src="a&amp;b.png"> is reported as a&b.png), and a complete document, including its <!DOCTYPE html> line, is accepted. Content inside <textarea>, comments and SVG <image> elements is not treated as an image.

Top-level elements count. A fragment that is a single <img src="c.png"> or <a href="/a"> is read like any other match; the notes report how many matches had no usable attribute, and how many matches in selector mode had no inner HTML (an <img> or a <br>, for example).

Selectors and output

The selector box takes jQuery-compatible CSS selectors, the language the page’s own engine (Sizzle) understands: .class, #id, [data-id], div > p, li:nth-child(2), and extensions such as :eq(1) or :contains(text). A selector that cannot be parsed is reported as an error instead of an empty result.

Selector mode prints each match’s inner HTML on its own line, so child markup survives the copy step. Duplicate values are listed once per occurrence, and the notes say how many of the values repeat.

Privacy, limits and accuracy

Everything runs locally. Measured on this build: a fragment containing <img src="https://example.com/x.png"> produces no network request, and an onerror attribute in the pasted markup does not execute. Nothing is uploaded, and the tool keeps working offline once the page has loaded.

Only pasted text is processed: there is no file upload, no URL fetching and no batch mode. Relative URLs stay relative because the fragment has no base URL of its own. The list is written in document order; it is a review aid, not a crawler.

Recent tools: