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 Use JSON Path Tester and Generator
Step by step, start to finish.
Any document. The sample has a nested array and two awkward keys to try things on.
Testing a path shows what it matches. Searching works backwards from a value to the path you need.
Each example shows one feature: a wildcard, any-depth, nesting, and a key that has to be quoted.
Paths alone, values alone, pairs, or a JSON object mapping each path to its value.
Key Features
What this tool does, and what it does not do.
Path to values, or value to path, on one page because people need both in the same minute.
Star for every child, two dots for anywhere below, which is most of what people type.
Keys with spaces or dots are quoted properly, so the path means what it looks like.
Array indexes collapsed to a star, turning thousands of paths into the document structure.
Paths, values, pairs, or a JSON object of path to value for feeding something else.
The document is parsed in this tab, so responses with tokens in them stay put.
About JSON Path Tester and Generator
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
Common questions about this tool.