XPath Tester
Run XPath 1.0 expressions against an XML document and see the matching elements, attributes or values.
Runs in your browserXML + XPath → Matches
Loading tool…
How to use the XPath Tester
- Paste an XML document and type an XPath expression such as //book/title or count(//book).
- Results update as you type: node sets list each match; count(), string() and boolean expressions show a single value.
Privacy and limitations
- Your data is processed on your device and is not uploaded to any server.
- Uses the XPath 1.0 engine built into your browser; XPath 2.0/3.1 functions are not available.
Frequently asked questions
Why does //title match nothing in my document?
If the document declares a default namespace (xmlns="..."), unprefixed names in XPath 1.0 do not match it. Use local-name(), e.g. //*[local-name()="title"].
Related converters
XML FormatterBeautify and indent XML while keeping comments, CDATA sections, attributes and element order exactly as written.JSONPath TesterEvaluate JSONPath expressions such as $..price or $.items[?(@.qty > 1)] against JSON and see the matched values or paths.XML to XSD GeneratorInfer an XML Schema (XSD) from sample XML: nesting, element order, optional and repeated elements, attributes and simple types.XML to HTML TableTurn repeated XML elements into an HTML table with a header row, with a safe live preview.XML to CSV ConverterConvert repeated XML records into CSV rows. Child elements and attributes become columns.XML to YAML ConverterConvert XML documents to readable YAML, keeping attributes as @_name keys and repeated elements as lists.XML to JSON ConverterConvert XML to JSON. Attributes become @_name keys, repeated elements become arrays, numbers are detected.XML MinifierMinify XML by removing whitespace between tags and, optionally, comments, to shrink file size.