JSONPath Tester

Type a JSONPath expression and paste your JSON. Every value it selects is listed with its full path, as you type, and nothing leaves this page.

How it works

Your JSON is read with a parser that keeps the exact text of every number, so a matched ID shows the digits you wrote.

The expression is read using the common core of RFC 9535 and the original JSONPath article: names, indexes, negative indexes, unions, slices, wildcards, recursive descent (..) and filters with comparisons, &&, || and !.

Comparisons follow RFC 9535. Only like values compare, so 8.95 == "8.95" is false and comparing text with a number is false, never an error. Each match is listed in document order with the path that reaches it.

How to use it

  1. 1 Paste your JSON, or press Try an example to load a small book store.
  2. 2 Type a JSONPath expression that starts with $.
  3. 3 Read the matches. Each row shows the path and the value found there.
  4. 4 Press Copy values as JSON to get the matches as an array, or Copy paths for one path per line.

Good to know

  • $..price finds every price at any depth. $.store.book[*].price finds only the prices of books.
  • Use [-1] for the last item of a list and [0:2] for the first two.
  • A filter with only a path tests that the key exists: $..book[?(@.isbn)] keeps books that have an ISBN.
  • Keys with spaces or dots need brackets and quotes: $["first name"].

Browser support

  • Chrome 94 and later
  • Firefox 93 and later
  • Safari 16.4 and later
  • Edge 94 and later

These are the oldest versions with everything the tool uses. They are worked out from the tool itself, so they change when it does.

Version numbers checked on 2026-09-04.

How to write a JSONPath query, and how to check it

JSONPath is a short way to point at values inside a JSON document. It does for JSON what a file path does for folders. $ is the whole document. .store moves into the key store. [0] moves into the first item of a list. So $.store.book[0].title is the title of the first book. Many tools take JSONPath: API test runners, Kubernetes kubectl, log viewers, database clients and data pipelines. When an expression returns nothing, it is hard to tell if the path is wrong or the data is not what you expected. A tester shows you both, side by side.

Most real queries use four extra pieces. The wildcard * means every key or every item, so $.store.book[*].author lists every author. The double dot .. means at any depth, so $..author finds authors wherever they are. Slices take part of a list: [0:2] is the first two items and [-1:] is the last one. Filters keep only the items that pass a test: $..book[?(@.price < 10)] keeps the books that cost less than 10, where @ is the item being tested. You can join tests with && and ||, reverse one with !, and group them with parentheses.

Filters are where JSONPath libraries disagree most. RFC 9535, the 2024 standard, settled how comparisons work, and this tool follows it. Only values of the same kind compare. 8.95 equals 8.95, but it does not equal the string "8.95", and "x" < 1 is simply false. A filter with a path and no comparison tests that the key exists, so ?(@.isbn) keeps items that have an isbn key at all. Filter functions such as length() and match() are refused by name, because each library runs them differently, and a tester that guessed would mislead you.

Each match is listed with its full path, written as $.store.book[2].title. That path is useful in its own right. It tells you which item matched, not just what value came back, and you can paste it into code or into another query. Copy values as JSON gives every match as one array, ready for another tool. Copy paths gives one path per line. Numbers are shown exactly as written in your document, because the parser keeps their text, so a long ID is never rounded.

The document and the query never leave your browser. That matters when the JSON is an API response with customer data or tokens in it. The tool takes up to 2 MB of JSON at a time and shows the first 500 matches on the page; the copy buttons always include every match.

Frequently asked questions

Which JSONPath syntax does this support?

The part that tools agree on: .name and ['name'], [0] and [-1], unions such as [0,2], slices such as [1:3] and [::2], *, .. and filters such as ?(@.price < 10 && @.stock > 0). It follows RFC 9535 for how comparisons behave.

Why does it refuse length() or match()?

Filter functions differ between JSONPath libraries, and this tool does not run them. It names the function and refuses it, rather than giving a result your own library would not.

Why does @.price == "8.95" find nothing?

Under RFC 9535 a number never equals a string. Write @.price == 8.95 to compare with the number.

Is my JSON sent anywhere?

No. Parsing and the query both run in this page. Documents up to 2 MB are handled at a time.

Related tools

Your files are processed on your device and are not uploaded. You can verify this in your browser’s developer tools under the Network tab.