XPath Tester for HTML
Evaluate relative XPath 1.0 expressions on pasted HTML, including attributes, counts, strings and booleans.
Start with your input
Edit the example or replace it with your own text.
Choose your options
These settings are optional. Keep the defaults to get started.
How to use XPath Tester for HTML
- Paste the example or your own input.
- Choose the options that match your task.
- Run the tool, review the result, then copy or download it.
When to use XPath Tester for HTML
XPath can target attributes or compute values that are awkward to inspect with a CSS selector alone. Paste an HTML fragment and start a relative expression from the synthetic wrapper element. For example, .//li selects descendant list items, .//li/@data-id selects their attributes, and count(.//li) returns a number. Results identify node types so attributes and elements are distinguishable.
How to interpret the result
This tester uses the browser XPath 1.0 engine on inert HTML, not an XML processor or XPath 2.0 implementation. Use relative paths beginning with a dot for navigation; absolute document paths are not useful in the detached wrapper. HTML tag names are normalized by the parser. No namespaces are registered, scripts are not executed, and pasted markup is never attached to the live page. Node result lists are limited to one thousand entries.
Example input
<ul><li data-id="1">Ada</li><li data-id="2">Grace</li></ul>
What should I check before using the output?
This tester uses the browser XPath 1.0 engine on inert HTML, not an XML processor or XPath 2.0 implementation.
Is input uploaded?
Processing takes place in your browser. This tool does not send your input or selected files to a conversion API.