Free XPath Tester

Test XPath expressions against XML data and see matched nodes instantly. Runs in your browser — your data never leaves your machine.

XPath Expression
XML Input
Results

🔒 100% Private

All evaluation happens in your browser using the built-in XPath evaluator. Nothing is uploaded to any server. Safe for sensitive data.

⚡ Real-time Evaluation

Matched nodes update instantly as you type your XPath expression. No need to click a button.

🔢 Match Count

See how many nodes matched your XPath expression at a glance, along with the serialized content of each match.

How to Use XPath

Paste your XML data into the input panel and enter an XPath expression. Matched nodes appear instantly in the output panel. Use path expressions like /bookstore/book/title to select specific elements, or //title to find all title elements anywhere in the document. Predicates like [1] or [@lang='en'] let you filter results.

XPath Syntax Reference

XPath uses / to select from the root, // to select nodes anywhere, . for the current node, .. for the parent node, and @ to select attributes. Axes like child::, descendant::, and ancestor:: provide fine-grained navigation through the XML tree. Functions like contains(), text(), and count() add powerful filtering capabilities.

Frequently Asked Questions

What XPath syntax is supported?
The tester supports full XPath 1.0 syntax using the browser's built-in XPath evaluator. This includes axes, predicates, functions, and all standard XPath expressions.
Does it evaluate in real-time?
Yes — the XPath expression is evaluated as you type and matched nodes update instantly.
Can I copy the results?
Yes — matched results can be copied to your clipboard with a single click.
Is this tool free?
Yes — completely free, forever. No sign-up, no account, no usage limits.
Is my data safe?
All evaluation happens locally in your browser using JavaScript. Nothing is uploaded to any server. It's safe to use with sensitive or proprietary data.
What is XPath?
XPath (XML Path Language) is a query language for selecting nodes from XML documents. It uses path expressions to navigate through elements and attributes in an XML document tree.