XPath Tester
Paste XML, type an XPath expression, and see what it selects.
XPath basics
/catalog/book— a path from the root ·//title— every title anywhere@id— an attribute ·text()— the text inside an element[1]— the first match (XPath counts from 1) ·[last()]— the last one[price > 500],[@id='2'],[contains(title, 'PHP')]— predicatescount(//book),sum(//price),string(//title)— functions that return a number or text
Where XPath is used
Web scraping and test automation (Selenium, Playwright locators), XSLT, reading XML feeds and SOAP responses, and configuration tools. The expressions run in your browser's own XPath 1.0 engine, so the results match what Chrome, Edge and Firefox do. Namespaced documents can use the prefixes declared on the root element. The XML stays on your device.
Free to useNo software to install — works in any modern browser.
No signup neededOpen the tool and start straight away.
Your file stays on your deviceEverything happens in your browser — nothing is uploaded.
Works on mobileSame tool on your phone, tablet or desktop.
How it works
- Open — choose your file; it stays on your device.
- Work — make your changes right in the browser.
- Save — download the result straight to your device.
Related tools
View allPrefer to just describe the task? The AI Assistant can convert, compress and resize files from a short instruction.
Rate this tool
Log in to leave a review.