JSONPath Tester
Runs a JSONPath expression against a document and highlights the matched nodes as you type.
Runs a JSONPath query against a document and shows every node it selected, with the path to each. It implements RFC 9535 — the 2024 standard — rather than one of the twenty years of mutually incompatible implementations that came before it, which matters as soon as your query has a filter in it.
Query
From the root: anywhere below, the member “book”; then the children that pass the filter; then the member “title”.
Document
Matches
Results appear here as you type.
This follows RFC 9535, the 2024 standard, not the twenty years of incompatible implementations before it. The differences that bite: a result is a nodelist and keeps duplicates, .. visits a node before its children, a missing member equals only another missing member, and comparing against a query that could match several nodes is a syntax error rather than a guess. Patterns inside match() and search() are handed to your browser’s own regular-expression engine, which accepts more than the I-Regexp dialect the RFC specifies.
How to use it
Paste the document
Anything that parses as JSON. The query runs in a worker, so a large document keeps the page responsive while you type.
Write the query, or start from an example
The buttons under the box cover the shapes people need: a wildcard, a descendant search, a slice, a filter, a regular expression and a function. A plain-English description of what your query means appears above them.
Read the matches with their paths
Each result carries the normalised path that reached it, so you can see whether a match came from where you expected. The stat line says whether the query is singular — able to select at most one node — which is what a JSON Pointer would be.
Common questions
My query works in another tool but not here.
Probably an RFC 9535 difference. The standard removed things older implementations allowed: script expressions in `()`, `$..[?(@.x)]` with the older parenthesised filter syntax, and comparing against a query that could match several nodes — that last one is now a syntax error rather than a guess.
Why does the same value appear twice?
Because the result is a nodelist, not a set. `$..price` reaching the same node down two branches lists it twice, by design — deduplicating would lose the information about where each match came from.
Are the regular expressions in `match()` standard?
Not exactly. The RFC specifies I-Regexp, a small dialect; the patterns here are handed to your browser’s own engine, which accepts more. A pattern that works here may be rejected by a strict implementation — worth knowing before you put one in production.
Can it modify the document?
No — JSONPath selects, it does not write. For editing, the paths shown here are RFC 6901 pointers and can go straight into a JSON Patch, which the JSON diff tool on this site produces.
Feed it from
JSON Formatter & Validator
Pretty-prints, minifies and validates JSON, pointing at the exact line and column of a syntax error.
JSON ⇄ XML
Converts between JSON and XML with configurable handling of attributes, arrays and text nodes.
JSON Diff
Compares two JSON documents structurally, ignoring key order and reporting added, removed and changed paths.
jq Playground
Runs jq 1.7 filters against pasted JSON in the browser with a cheatsheet, and hands you the matching command line.
Next
These accept what this tool produces, so the result can go straight in.
jq Playground
Runs jq 1.7 filters against pasted JSON in the browser with a cheatsheet, and hands you the matching command line.
JSON Diff
Compares two JSON documents structurally, ignoring key order and reporting added, removed and changed paths.
JSON Formatter & Validator
Pretty-prints, minifies and validates JSON, pointing at the exact line and column of a syntax error.
XPath Tester
Evaluates an XPath or CSS selector against XML or HTML and lists every matched node.
JSON ⇄ CSV
Flattens nested JSON into columns or rebuilds objects from a table, with a dot-path column naming rule.
JSON to TypeScript
Infers TypeScript interfaces or types from a JSON sample, merging optional and union fields.