Skip to main content
WizTools123
WizTools123
Free Online Tools

Tool Categories


JSON Tools New Tool

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.

Free Forever Nothing Uploaded Test and generate Every path listed
Free Online JSON Path Tester and Path Generator
Share this tool
Advertisement Slot (Top Banner) Google AdSense Unit • Responsive Banner
JSON Path Tester and Generator Your file is read inside this tab. Nothing is uploaded anywhere.
Drop a JSON file here Or paste the document below. Choose a file Up to 15 MB per file. Nothing is uploaded.
0%
Or paste it
Reading
What to do
The path
Find
Which paths
The result matches

0 matches - what came back 0 paths in the document 0 levels deep

Result
0 characters 0 lines 0 B
Buy Us A Coffee

Enjoying WizTools123? Help keep our server infrastructure 100% free and open for everyone.

Buy Us A Coffee
Sponsored Content (Below Tool) Google AdSense Placement

How to Test a JSON Path

A few steps, and nothing is uploaded.

1
Paste the JSON, or drop the file Any document. The sample has a nested array and two awkward keys to try things on.
2
Write a path, or search instead Testing a path shows what it matches. Searching works backwards from a value to the path you need.
3
Use the buttons to see the syntax Each example shows one feature: a wildcard, any-depth, nesting, and a key that has to be quoted.
4
Copy what you need Paths alone, values alone, pairs, or a JSON object mapping each path to its value.

What to Know About JSON Paths

What is supported, and the one thing deliberately left out.

Filter expressions are not supported, deliberately. Something like $.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.
Everything else people actually type does work. A key name, an array index, * 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.
A path is quoted when it has to be. A key called "first name" cannot be joined with a dot, so it comes out as $.meta["first name"]. So does a key containing a dot, since $.run.id would mean something different from $["run.id"] and silently find nothing.
Matching nothing and matching an empty value are different answers. If a path matches no nodes you are told so; if it matches a node whose value happens to be null or an empty string, you see that value. Conflating the two sends people looking for a typo in the wrong place.
The shapes view is for writing code against an unfamiliar response. Collapsing every array index to [*] turns four thousand paths into a couple of dozen, which is the actual structure of the document rather than a list of its contents.
Two dots is powerful and expensive. It walks the whole document from that point, so on a large file it can match thousands of nodes. The limit box exists for that, and the counter tells you how many were found before the limit applied.

Key Features & Capabilities

What this tool does, and what it deliberately does not.

Both directions Path to values, or value to path, on one page because people need both in the same minute.
Wildcards and any depth Star for every child, two dots for anywhere below, which is most of what people type.
Awkward keys handled Keys with spaces or dots are quoted properly, so the path means what it looks like.
Shapes view Array indexes collapsed to a star, turning thousands of paths into the document structure.
Four output shapes Paths, values, pairs, or a JSON object of path to value for feeding something else.
Nothing is uploaded The document is parsed in this tab, so responses with tokens in them stay put.

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.

Not filter expressions. Names, indexes, star for every child, two dots for any depth and quoted brackets all work. Filters need a small expression language, and an approximate implementation would silently return wrong answers, so it is left out rather than half done.

Use the find mode. It compares keys or values with contains or exactly, and gives you the path to each match. It is less expressive than a filter and it is honest about what it did.

Because a dot would change its meaning. A key with a space, a dot or a dash in it has to be written as $["first name"], otherwise the path looks correct and matches nothing.

A path that matches no nodes is reported as nothing found. A path that matches a node holding null or an empty string shows you that value. They look similar and mean completely different things.

It collapses every array index to a star, so a thousand item list becomes one path. That gives you the structure of the document rather than its contents, which is what you want when writing code against it.

Because it walks every node below that point, which on a large document is all of them. The limit box caps how many matches are shown, and the counter tells you how many existed.

Other JSON Tools

Advertisement Slot (Bottom Banner) Google AdSense Unit • Responsive Banner