Code · Made a little simpler

XPath Finder and Tester

Test XPath against local XML or HTML. Inspect selected nodes, scalar results and namespace-aware paths, then save a JSON report.

Free to useNo account neededProcessed on your device
Your workspaceProcessed on your device

Add this tool to your website

Paste this code into your page to add the tool and a visible ToolMellow credit link.

HTML embed code
Preview embed

XPath Finder and Tester: how to use it

  1. Paste XML or HTML, or open a UTF-8 markup file.
  2. Enter XPath expressions or inspect elements to generate a concrete path.
  3. Run XPath, inspect each line of results and copy or download the report.

Limits and notes

Accepts 200,000 UTF-16 code units, 5,000 nodes and attributes, and 24 XPath 1.0 expressions of up to 2,000 units each. Each node-set report shows up to 25 matches. XML rejects DTD declarations. HTML is interpreted as a parsed HTML document, with regular HTML tags available without a namespace prefix.

How your privacy works →

XPath Finder and Tester: common questions

Why is an unprefixed XPath empty for my default namespace?

XPath 1.0 unprefixed element names select no-namespace elements. Use the built-in default: prefix for the XML root namespace, or enter an explicit prefix mapping.

Can I test a number such as count(//item)?

Yes. The report distinguishes numbers, strings, booleans and node sets.

Where did a generated path come from?

The path uses the actual ancestors and sibling positions in the parsed document. Namespace tests keep generated paths usable with the same source.

Guides