JSONPath Tester Online
Run A Path, See Every Match
This JSONPath tester online runs your path on your JSON and lists every match with its exact address. Filters, slices and wildcards all work, right in your tab.
- FreePrice
- 8Selectors
- NoneSign-up
- NoneUploads
JSONPath Tester
Type a path, see every match and the exact path to it
Paste some JSON on the left to start.
JSONPath syntax at a glance
$ | The root of the document. |
|---|---|
@ | The current item, inside a filter. |
.name ["name"] | A child, by name. |
[*] .* | Every child. |
.. | Search at any depth below. |
[0] [-1] | One list item, counted from the start or from the end. |
[0,2] | Several items at once. |
[1:3] [::2] | A slice: from, up to but not including, and a step. |
[?(@.price < 10)] | A filter: keep the children where the test is true. |
&& || ! | And, or and not, inside a filter. |
=~ /^a/i | Match text against a regular expression. |
length() count() | Functions: length, count, match, search and value. |
Ready. Paste JSON, type a path and the matches appear.
What A JSONPath Tester Online Is For
JSONPath is a small language for picking values out of JSON. Think of it as XPath for JSON. One short line can pull every price out of a huge reply.
This JSONPath tester online lets you try a path before you put it in code. Paste your JSON, type the path, and the matches appear as you type. Each match shows its own full path, too.
That helps in many places. API tools, test suites, log search and no-code apps all take JSONPath. A wrong path returns nothing, and nothing looks like success. So testing first saves time.
The engine is built from scratch, and it never runs your text as code. It follows the shape of RFC 9535, and it also accepts the older style most people know.
JSONPath also helps when you debug. Say a test fails because a field is missing. Paste the response, run a path, and see in seconds whether the field exists, and where. Then you can fix the test with confidence.
Your First Path
Every path starts with a dollar sign. It stands for the root of the document. After it, you add steps. A dot and a name pick a child. So $.store.bicycle.color walks down to the color of the bicycle.
Square brackets do the same job and also allow names with spaces or dots. Write $["my key"] for those. Numbers in brackets pick a list item, starting at zero.
Press Try a sample and click an example chip. The tool fills the path and runs it at once.
Wildcards And Searching Everywhere
A star means every child. $.store.book[*].author gives the author of every book. The same star works after a dot, as in $.store.*.

Two dots mean search at any depth. $..price finds every price in the whole document, whether it sits in a book or on a bicycle. This is the fastest way to find a value when you do not know where it hides.
Results come back in document order. Each one shows the exact path where it lives, so you can copy it and use it as a precise address.
Also remember that results keep their order. If a list holds ten items, the matches come back in the same order. So you can pair them with another list safely.
Slices, Unions And Negative Indexes
You can pick several items at once. [0,2] takes the first and the third. [1:3] is a slice. It takes items from index 1 up to, but not including, index 3.

Slices accept a step. [::2] takes every second item. Negative numbers count from the end, so [-1] is the last item and [-2:] is the last two.
JSONPath Filter Online
Filters are the most powerful part. They keep only the children that pass a test. $.store.book[?(@.price < 10)] keeps books cheaper than ten. The at sign stands for the item being tested.

Combine tests with and, or and not. Test that a key exists by writing it alone, such as [?(@.isbn)]. Compare numbers, text, true, false and null.
Need to match text? Use a regular expression with =~, as in [?(@.author =~ /^e/i)]. Or call a function such as length(@.title) or count(@.*).
Clear Messages When A Path Is Wrong
A typo should not leave you guessing. When the path is invalid, the tool says what is wrong and puts a caret under the exact spot. A missing bracket, a bad regular expression and an unknown function each get their own sentence.

Three Ways To Write A Path
Every match shows its address. Switch Show paths as to brackets, dots or JavaScript. The JavaScript form, such as data.store.book[0].title, drops straight into your code.
Using The JSONPath Tester, Step By Step
Four steps take you from raw JSON to a path you trust.
- 1
Paste your JSON
Paste it, open a file, or load the bookstore sample. The tool checks it as you type.
- 2
Type a path
Start with a dollar sign. Click an example chip if you want a head start.
- 3
Read the matches
Each match shows its value and its own path. The counter says how many there are.
- 4
Copy what you need
Copy the values as a JSON list, or the paths, one per line.
What This JSONPath Tester Does Differently
Plenty of testers return a value and stop. These are the extras.
Every match shows its path
You see the exact address of each hit, in brackets, dots or JavaScript. Copy any of them.
Real filters
Use and, or, not, comparisons, regular expressions and functions inside a filter.
Helpful errors
A caret points at the mistake, and a plain sentence says what to change.
Exact numbers
Long ids keep every digit, so a match never shows a rounded number.
Built-in cheat sheet
A short table of the syntax sits under the tool, so you never leave the page.
Nothing leaves your tab
Real API data often holds private details. Because your browser does the work, none of it reaches this site.
Habits For Writing Reliable Paths
A path that works on one sample can fail on the next. These habits help.
- Start with the shortest path. Add one step at a time. When a path breaks, you know which step did it.
- Use two dots sparingly. Searching at any depth is handy. But it can match fields you did not mean to pick. Prefer a clear path when you know it.
- Test with real data. Paste a true response, not a tidy example. Real data has missing keys and odd values.
- Check the empty case. Ask what the path returns when nothing matches. Your code must handle an empty list.
- Test that a key exists before you compare it. A filter on a missing key simply drops the item. Add an existence test if you need to know why.
- Quote names that have special characters. A name with a dot or a space needs brackets and quotes, such as
["my key"]. - Mind the type in a comparison. The number 5 and the text "5" are different. A filter that compares them says no.
- Know your library. Different libraries support slightly different syntax. Test here, then check your library for edge cases.
- Use the exact path for updates. To change one value, use the full path from the list, not a search. That avoids touching the wrong one.
- Save your best paths. Keep a short list in your notes. A good path is worth reusing.
Common JSONPath Mistakes This Tester Catches
Each of these returns nothing or the wrong thing. The tester shows it at once.
Forgetting the dollar sign
A path must start with $. The tester tells you so, instead of returning an empty list.
A missing bracket
An open bracket with no close breaks the whole path. The caret shows where it ends.
Counting from one
Lists start at zero. So
[1]is the second item, not the first.Comparing the wrong type
A price stored as text will not pass a number test. Check the value in the results.
Using script brackets
Old syntax such as
[(@.length-1)]runs code. This tool refuses it for safety. Use a negative index instead.Matching too much with two dots
A deep search can pick up lookalike keys in other places. Read the path of each match.
JSONPath Tester Questions People Ask
Is this JSONPath tester online free?
Yes. It costs nothing, needs no account and has no limits. It runs in your browser, so we have no server cost to pass on.
Is my JSON uploaded anywhere?
No. Your browser runs the path. Nothing reaches this site, and we keep nothing. Closing the tab clears it all.
What is JSONPath?
It is a query language for JSON. A short expression selects values by name, position or condition, much as XPath does for XML.
Does it follow RFC 9535?
It follows the shape of the standard, with filters, slices and functions. It also accepts the older Goessner style that many libraries still use.
What does two dots mean?
It means search at any depth. <code>$..name</code> finds every name key, however deep it sits.
How do I filter by a value?
Use a filter in brackets. For example, <code>[?(@.price > 10)]</code> keeps the items with a price above ten. The at sign stands for the item.
Can I use a regular expression?
Yes. Write <code>=~</code> and a pattern between slashes, such as <code>[?(@.name =~ /^a/i)]</code>. The i flag ignores case.
Why does it say script expressions are not supported?
Old syntax with round brackets in square brackets evaluates code. We refuse it so nothing can run. A filter or a negative index does the same job.
Why does my path return nothing?
Check the names, the case and the brackets. Also check the type in a filter. Start from <code>$</code> and add one step at a time.
Can I use the path in my code?
Yes. Most libraries accept the same syntax. Test here, then paste the path into your code. If a library differs, the cheat sheet shows what to adjust.
What happens with duplicate keys?
The first one wins when you pick by name. A deep search can still reach both, because it visits every entry.
Are big numbers shown exactly?
Yes. The reader keeps every digit, so a 20-digit id appears as you wrote it.
Does it work on a phone?
Yes. The two panels stack and the example chips wrap. For long editing, a keyboard is still easier.
Handy Companions For JSON Work
Testing a path is one step. These three tools handle the steps around it.
JSON Viewer
Read JSON as a tree or a table, then edit it.
Open tool →JSON Formatter
Beautify, minify and validate with the exact line of any error.
Open tool →JSON Diff
Compare two JSON documents by meaning, and list every change.
Open tool →
Ready To Test A Path?
Paste your JSON, type a JSONPath, and read the matches. The tester is free, needs no account, and keeps every byte on your device.