XP

XPath Tester

Run XPath queries on XML or HTML

JSON & Data
πŸ”’ 100% client-side β€” your data never leaves this page
Page mode
Input

Quick CTA

Paste XML or HTML plus an XPath expression first to inspect matches immediately; parser mode notes stay in Deep.

Matches
XPath results will appear here
πŸ”’ 100% client-side β€’ DOM XPath evaluator
Page reading mode

Quick keeps the summary, direct answers, and next steps so you can validate fit and get a result faster.

About this tool

This XPath tester lets you run XPath expressions against XML or HTML source and immediately review matched nodes, attributes, or text values. It helps debug scraping selectors, validate XML feed extraction, and verify rule-based transformations before deployment. You can switch parser mode between strict XML and permissive HTML depending on source format. Parsing and evaluation run locally in your browser.

Direct Answers

Should I parse as XML or HTML?

Use XML for strict structured documents and HTML mode when the source is real web markup with browser-style parsing rules.

Why does a valid-looking XPath still return no matches?

The document may parse differently than expected, or the XPath targets text, attributes, or nodes that are not actually present.