XPath Tester
Paste an XML document and an XPath expression to see every matching node or value listed instantly. Runs entirely in your browser.
This works right here on your device — nothing gets sent out.
Matches
Match 1: "XML Basics"
Match 2: "XPath Guide" Example shown — replace it with your own XML and XPath expression.
How it works
- Paste your XML document and an XPath expression.
- The tester evaluates the expression against the document.
- Every matching node or value is listed in order.
Evaluation parses the XML into a DOM tree, then walks it using the
XPath expression's path steps and predicates — the same engine
browsers use internally for document.evaluate() — and
lists every node the expression selects.
FAQ
Is my XML uploaded anywhere?
No. Evaluation happens entirely in your browser — your XML document is never sent to a server.
Which XPath version is supported?
XPath 1.0 — the version supported natively by browsers, covering the vast majority of everyday element, attribute, and text selection needs.
Can I select attributes, not just elements?
Yes — expressions like //book/@id return attribute values alongside element text.
What happens if my expression matches nothing?
The tool reports zero matches rather than an error, so you can tell a valid-but-empty result apart from a syntax mistake.
How we compare
| Feature | Online Tool Store | Browser DevTools console | Desktop XML editor |
|---|---|---|---|
| No file upload — runs in your browser | ✓ | ✓ | Desktop install required |
| No page context needed — paste any XML | ✓ | Needs the document loaded in a tab | ✓ |
| Free, no sign-up | ✓ | ✓ | Many are paid |
The DevTools console needs the document already loaded in a page and a few lines of boilerplate. XPath Tester is a dedicated space — paste any XML, test an expression, see the matches, no page or install required.