XPath Tester
Test XPath expressions against your XML and see every match. Free, and runs entirely in your browser — nothing you enter is uploaded or stored.
About Path Finder
Selects nodes from a document by expression instead of by scrolling. JSON and YAML use JSONPath — $.items[*].sku, $..price, $.items[?(@.qty > 1)]. XML uses XPath, which reaches attributes and positions a JSONPath cannot express.
Every match comes back with the path where it was found, so the tool answers both “what matched” and “where does it live”, which is what makes the result useful in code afterwards.
Where it helps
- JSONPath for JSON and YAML, XPath for XML — the expression language each format already has.
- Each match carries its path, so the result is actionable and not just a list of values.
- Recursive descent finds a field wherever it is nested, which is the usual reason for reaching for a path at all.
- The document never leaves the browser, so live payloads are safe to explore.
Limits
- The JSONPath support is a practical subset: keys, indices, slices, wildcards, recursive descent and single-comparison filters — not script expressions.
- XPath comes from the browser's own engine, which is XPath 1.0; XPath 2.0 and 3.1 functions are unavailable.
- The table shows the first 50 matches; the full set is in the output below it.
- An expression runs against one document: there is no joining across files the way a query language would allow.
Frequently asked questions
Which JSONPath syntax is supported?
$.key, ['key with spaces'], [0], [-1], [1:3], [*], ..key for recursive descent, and filters such as [?(@.qty > 1)] with one comparison.
How do I select an attribute in XML?
With XPath: //item/@sku selects the attribute itself, and the match is reported against the element that carries it.
Why is there no CSS selector option?
CSS selectors are an HTML idiom, and HTML lives in the Web Development tools. For XML, XPath does everything a selector would and reaches attributes as well.
Why did nothing match when I can see the value?
Check the root: JSONPath starts at $, and a leading $ is optional here but the first key must exist at the top level. For a field nested anywhere, use $..field.
Related tools
- Expression Evaluator — Reduce a JSONPath or XPath match to a single answer
- Tree Viewer — Explore JSON, XML, YAML, TOML, TOON or HCL as a collapsible tree
- Regex Tester — Test patterns, inspect groups and preview replacements
- Structure Formatter — Pretty-print JSON, XML, YAML, TOML, TOON or HCL with a chosen indent
- Structure Converter — Convert between JSON, XML, YAML, TOML, TOON, HCL and CSV
- String Escaper — Escape a JSON, XML, YAML, TOML or TOON document for embedding, or read one back
More Structured Formats tools
- Structure Converter — Convert between JSON, XML, YAML, TOML, TOON, HCL and CSV
- String Escaper — Escape a JSON, XML, YAML, TOML or TOON document for embedding, or read one back
- Structure Formatter — Pretty-print JSON, XML, YAML, TOML, TOON or HCL with a chosen indent
- Structure Validator — Check JSON, XML, YAML, TOML, TOON or HCL and report structural problems
- Tree Viewer — Explore JSON, XML, YAML, TOML, TOON or HCL as a collapsible tree
- Code Generator — Turn a JSON, YAML, XML or other document into TypeScript, Go, C#, Python, Rust and more
- Schema Generator — Write a JSON Schema, XSD, Avro schema or .proto from a document you already have
- Schema Validator — Check a document against a JSON Schema, .proto, Avro schema, XSD or RELAX NG
- Table Viewer — Show the records in a JSON, XML, YAML, TOML or TOON document as a table
- Structure Compare — Diff two JSON, XML, YAML, TOML, TOON or HCL documents by path
- Structure Repair — Fix broken JSON, YAML, XML, TOML, TOON, INI, .env, .properties and HCL, listing every repair
- Structure Minifier — Strip formatting from JSON, XML, YAML, TOML or TOON
- Path Finder — Select nodes with JSONPath or XPath
- Protobuf & Avro Decoder — Read protobuf wire bytes and Avro container files without their schema
- Expression Evaluator — Reduce a JSONPath or XPath match to a single answer