jsonpath tester

paste json, type a path such as $.users[*].name, and see every matching value update as you type.

runs on your device · free · no sign-up

loading tool…

how to jsonpath tester

  1. paste your json into the box, or press sample to try it out.
  2. if it is invalid, read the line and column message and press jump to error to land on the problem.
  3. pick an indent, minify it, or turn on sort keys, then switch between text and tree view.
  4. type a path such as $.users[*].name to pull out values, then copy or download the result.

the query box supports the parts of jsonpath used most: root $, child names, array indexes including negative ones, [*] and .* wildcards, quoted keys for names with spaces, and $..key to find a key anywhere in the document. with one match you see the value, with several you see an array of them.

filter expressions like [?(@.price < 10)] and slices are not supported. for those, test in a full library such as jq or a jsonpath package. this tester is aimed at quickly checking that a path points where you think it does before you paste it into code.

more ways to json formatter

frequently asked questions

what jsonpath syntax works here?

$ for the root, .name or ["name"] for keys, [0] and [-1] for array items, * for all children and .. for a recursive search. filters and slices are not available.

why does my path return no matches?

check the key spelling, since matching is case sensitive, and the array indexes. a missing key gives zero matches and no error. use the tree view to click the key and copy its exact path.

is the result a single value or a list?

one match is shown as the value itself and more than one as an array. the line above the result tells you how many matches there were.

related tools