Loading tool...
Test regex patterns with live matching, capture groups, flags (g/i/m/s/u), pattern library with common expressions, find & replace, and detailed match breakdown
Format, validate XML with XPath queries, interactive tree view, XML-to-JSON conversion, and multiple color themes
Minify or beautify code in 7 languages: JavaScript, TypeScript, CSS, HTML, JSON, XML, SQL with compression visualization
XPath lets you navigate and query XML documents, but writing correct expressions requires trial and error. This tester lets you paste XML, write an XPath query, and instantly see matched nodes highlighted in the document. It supports XPath 1.0 expressions including axes, predicates, and functions.
Test XPath expressions that will be used in XSLT transformations to make sure they select the right elements.
Build and verify XPath selectors for scraping tools like Scrapy or Selenium before writing the actual scraping code.
Query large XML documents to extract specific values — prices from a product feed, timestamps from log data, or fields from SOAP responses.
Practice XPath expressions with immediate visual feedback to understand axes, predicates, and node selection.
The evaluator parses your XML into a DOM tree and runs your XPath expression against it. Matched nodes are highlighted in the source view, and their values are listed in a results panel. This makes it straightforward to verify that your expression selects exactly the nodes you intend — before embedding it in XSLT, scraping scripts, or configuration extractors.
The tool supports XPath 1.0, which is what browsers implement natively. XPath 2.0+ features like sequence types and regular expressions are not available.
For namespace-aware queries, you may need to use the local-name() function — for example, //*[local-name()="element"] — since namespace prefix registration depends on the implementation.
XPath works on XML. HTML can often be parsed as XML if it is well-formed (XHTML), but standard HTML with unclosed tags may need to be cleaned up first.
All processing happens directly in your browser. Your files never leave your device and are never uploaded to any server.