Runs locally — nothing is uploaded
Result
Paste HTML or XML and enter an XPath expression.
How to use
- 1Paste HTML or XML, or load a file.
- 2Type an expression such as //a/@href or count(//li).
- 3Read the matching nodes and export them as CSV or JSON.
Sitemaps use a default namespace. Write //x:loc (x stands for the default namespace) or //*[local-name()="loc"].
XPath 1.0 as built into your browser, with functions such as contains(), normalize-space() and count().
Input that starts with <?xml or has a namespaced root element is parsed as XML; everything else as HTML.
Related tools
CSS selector testerTest selectors for scraping
curl convertercurl to Python, Node.js, PHP, Go, wget
HTTP headers parserRaw headers to table, JSON or code
Cookie parserSet-Cookie attributes and security flags
HTML table to CSVTables from HTML to CSV
Sitemap URL extractorURLs, lastmod and sections from a sitemap
Need data from a website?
Send the URL and fields — we reply with a free sample and a quote.