JSONPath Tester

Test JSONPath expressions online. Query nested JSON with paths like $.users[*].email and see every match and its path instantly.

Try:

JSON input

1

Matches

Waiting for input

About this tool

JSONPath is a query language for JSON, similar to XPath for XML. A path starts at the root with $ and walks through keys, array indexes, wildcards and filters. This tester runs your expression against your document and lists each match with its full path, so you can build and check a query before using it in code.

JSONPath syntax cheat sheet

Use these building blocks to write most queries.

$                      the root of the document
$.users                the "users" key
$.users[0]             the first item of the array
$.users[*].email       the email of every user
$..name                every "name" key at any depth
$.users[?(@.age > 30)] users where age is above 30
$.users[-1:]           the last user

Tips for building queries

Start with a simple path and add one step at a time, checking the matches as you go. Use $.. (recursive descent) to find a key when you do not know how deep it is. Wildcards and filters return a list, so an empty result means nothing matched, not that the query is invalid.

How to use it

  1. Paste your JSON, then type a JSONPath expression, or pick one of the sample queries.
  2. Every match is listed with its path and value, and the Copy button gives you all matched values as a JSON array.
  3. Click a match to jump to that value in your JSON.

Frequently asked questions

What does $ mean in JSONPath?

It is the root of the document. Every path starts from it.

How do I filter items?

Use a filter expression such as $.users[?(@.age > 30)].name, where @ is the current item.

Does it run my data on a server?

No. The query runs in your browser.

Need something simpler? Try the JSON Tree Viewer or the JSON Validator on jsonchecker.in.

More advanced tools

Basic JSON tools on jsonchecker.in