XPath tester
Test and Evaluate XPath Expressions Instantly
XPath (XML Path Language) is a query language used to select nodes from an XML document. Writing complex XPath queries can be difficult without immediate feedback. Our XPath Tester allows you to paste your XML and write queries, seeing the matched nodes or values update in real-time.
Common XPath Examples
//book- Selects all book nodes no matter where they are.//book[1]- Selects the first book node.//@lang- Selects all attributes named lang.//book[price<35]/title- Selects titles of books with a price less than 35.
Frequently Asked Questions
Common questions about this tool.
How do I test my XPath? ▼
Enter your XML document in the left pane, and type your XPath expression in the query box above it. The results will instantly appear on the right.
What XPath version is supported? ▼
This tool uses your browser's native XPath evaluator (DOMParser and document.evaluate), which generally supports XPath 1.0 specifications.
Is my XML sent to a server? ▼
No. The parsing and XPath evaluation happens entirely locally in your web browser for complete privacy.
Related Free Utilities
View all tools →ChatGPT Ad Blocker
Block ChatGPT upgrade banners, upsell promo cards, and partner app ads with a lightweight, privacy-first Manifest V3 Chrome extension.
JSON diff
JSON diff. Use this privacy-first json diff directly in your browser.
Base64 encoder
Base64 encoder. Use this privacy-first base64 encoder directly in your browser.
URL parser
URL parser. Use this privacy-first url parser directly in your browser.