Run an expression to see matching nodes.
Evaluate XPath expressions against XML online, free. XPath is the W3C query language for navigating XML — it selects nodes, attributes and values by path, with predicates and functions. This tester parses your XML with the browser's native DOM and evaluates an XPath expression against it, listing every matching node, attribute, string, number or boolean so you can verify a query before using it in code, XSLT, or a scraper.
Evaluation uses the browser's built-in XML parser and XPath engine (document.evaluate), so it follows the W3C XPath 1.0 spec exactly — and your XML never leaves the page. 100% free, no registration, and complete privacy — everything runs locally in your browser, so your data never touches a server.
Paste XML, type an XPath expression and instantly see every node, attribute or value it selects.
Uses the browser's document.evaluate, so results match the W3C XPath 1.0 behaviour used across tools.
Handles node-sets, attributes (//@id), strings, numbers (count(...)) and booleans, each labelled by type.
Your XML is parsed and queried locally; nothing is uploaded, so it is safe for sensitive documents.
XPath (XML Path Language, a W3C standard) is a query language for selecting parts of an XML document. Paths like /bookstore/book navigate from the root, // searches anywhere, @ selects attributes, and predicates in square brackets filter by condition — for example //book[@category='tech']/title selects the titles of tech books.
It uses the browser's native document.evaluate, which implements W3C XPath 1.0 — the same engine browsers use internally. That covers node selection, attributes, predicates and core functions like count(), text() and contains(). XPath 2.0/3.1-only features are not available in browsers.
Use @ for attributes — //book/@category returns the category attributes — and text() for text nodes — //title/text() returns the title strings. To count matches, wrap a node-set in count(), e.g. count(//book), which this tool reports as a number result.
The most common cause is XML namespaces: if your document declares a default namespace (xmlns="..."), unprefixed XPath steps won't match. Other causes are a typo in an element name (XPath is case-sensitive), using / where you need //, or an XML parse error — which this tool reports above the results.
Yes. It evaluates XPath for free with no signup and runs entirely in your browser using the native XPath engine, so your XML is never uploaded — covering the same node, attribute and value queries as hosted testers.
No. Parsing and evaluation happen in your browser via the built-in DOM; the document is never transmitted or stored, so it's safe to test against confidential XML.
We use cookies for analytics and personalized ads to help keep these tools free. Until you accept, ads stay non-personalized and analytics cookies are off. See our Privacy Policy.