XPath Tester & Evaluator
Evaluate XPath expressions against XML and see the matching nodes — 100% in your browser.
Enter XML and an XPath expression to see matches.
About XPath Tester & Evaluator
Paste XML and an XPath expression to see what it selects — element nodes (shown as markup), attributes, or string/number/boolean results from functions like count() and text(). It uses the browser's built-in XPath 1.0 engine, so results match what runs in the DOM.
It's ideal for building and debugging XPath for scraping, XSLT or config files. Everything runs locally in your browser; your XML is never uploaded.
Select by attribute
//book[@category='sci-fi']/title
<title>Dune</title>
Try count(//book) for a number, or //book/@category for attributes.
Frequently asked questions
Which XPath version is supported?
XPath 1.0, via the browser's native document.evaluate — including axes, predicates and functions like count(), text() and contains().
It says the XML isn't well-formed — why?
The XML must parse cleanly (matched tags, quoted attributes, a single root). Fix the reported issue and try again.
Why don't my namespaced elements match?
XPath 1.0 needs namespace prefixes to select namespaced elements. For simple cases, remove the default namespace or use local-name() in your expression.
Is my XML uploaded anywhere?
No. Evaluation happens entirely in your browser.