Free Online JSON Path Tester and Path Generator
Test a JSON path against a document and see every value it matches, with the full path of each one. Or go the other way: search for a key or a value and get the exact path to use in your code. Wildcards and any-depth searching work, and the list of every path in the document can be copied out.
Enjoying WizTools123? Help keep our server infrastructure 100% free and open for everyone.
How to Test a JSON Path
A few steps, and nothing is uploaded.
What to Know About JSON Paths
What is supported, and the one thing deliberately left out.
$.items[?(@.price>10)] needs a small expression language, and a half working one is worse than none: it accepts your filter, returns something, and you have no way to know it was wrong. If you need to select by value, use the find mode, which is explicit about what it compares.
* for every child of a node, .. for any depth, and a quoted bracket for keys with spaces or dots in them. That covers nearly every path anyone writes by hand.
$.meta["first name"]. So does a key containing a dot, since $.run.id would mean something different from $["run.id"] and silently find nothing.
[*] turns four thousand paths into a couple of dozen, which is the actual structure of the document rather than a list of its contents.
Key Features & Capabilities
What this tool does, and what it deliberately does not.
About the JSON Path Finder
There are two moments when you need a JSON path, and they pull in opposite directions. In the first, you have written an expression and want to know whether it finds the right thing. In the second, you are staring at a value in a response and need the expression that reaches it. Both are the same page here, because in practice you switch between them constantly while writing code against an unfamiliar API.
The honest limitation is filters. Full JSONPath includes expressions like selecting every item whose price exceeds ten, and implementing those means writing a small language with its own parser, operator precedence and type coercion rules. Libraries that do it well are substantial; implementations that do it approximately are worse than useless, because they return a plausible answer to a query they misunderstood. So filters are left out and said so, and selecting by value is handled by a separate mode that is explicit about exactly what it compares.
The quoting detail matters more than it sounds. Keys with spaces, dots or dashes are common in real data, especially anything generated from a form or a spreadsheet. A path that joins them with dots looks right and finds nothing, and the resulting half hour of debugging is spent looking for the wrong mistake. Quoting them correctly costs nothing and removes the problem.
Frequently Asked Questions
Syntax, wildcards, filters and awkward keys.