JSONPath Tester

Free. No sign-up. Your input is processed in your browser.

Test a JSONPath expression and see every match as you type.

How to use it

  1. Paste your JSON, drop a file on the box, or press Example.
  2. Type a JSONPath in the JSONPath field, such as $..price. Matches appear as you type.
  3. Choose Values to see the matched values as a JSON list, or Paths to see where each match is.

Examples

JSONPathResult
$.store.book[0].titleThe title of the first book
$..priceEvery price, at any depth
$.store.book[-1]The last book
$.store.book[0:2]The first two books
$.store.book[?@.price < 10]Books that cost less than 10
$.store.book[?@.isbn]Books that have an isbn field
$..book[?match(@.author, 'A.*')]Books whose author starts with A

What is supported

The tester follows the JSONPath standard, RFC 9535: names, indexes, slices, *, recursive search with .., lists such as [0,2], and filters with == != < <= > >=, &&, || and !. The functions length(), count(), match(), search() and value() are available. Older JSONPath tools differ in places, for example in script expressions such as (@.length-1), which are not supported.

Limits

Up to 10,000 matches are listed. Matched values keep their original spelling, so large numbers keep every digit, but filters compare very large numbers as rounded values. The path of a box in the JSON graph viewer can be pasted here.

Example

Made-up input, and what JSONPath Tester returns for it. Long text is shortened.

Your JSON
{
  "store": {
    "book": [
      {
        "title": "Sample Book One",
        "author": "A. Writer",
        "price": 8.95,
        "tags": [
          "guide"
        ]
      },
      {
        "title": "Sample Book Two",
        "author": "B. Author",
        "price": 12.99,
        "isbn": "0-000-00000-0"
      },
      {
        "title": "Sample Book Three",
        "author": "A. Writer",
        "price": 22.5,
        "isbn": "0-000-00000-1"
…
Result
[
  "Sample Book One",
  "Sample Book Two"
]

Questions

Is this the same as jq?

No. jq is a different query language. This tester uses JSONPath.

Is my JSON uploaded?

No. The query runs in your browser, and the editor cannot send requests.

Related tools

See all tools