JSONPath Playground

Evaluate JSONPath queries against JSON live.

The JSONPath Playground runs a JSONPath query against a JSON document and lists every match with its path and value. Type the query, paste the JSON, and the results update after a short pause. It is useful for exploring unfamiliar JSON and for preparing queries before using them in code.

What is JSONPath?

JSONPath is a query language for selecting parts of a JSON document, comparable to XPath for XML. A query starts with $, the root, followed by steps: dot or bracket notation to pick a key, [0] to pick an array index, [*] or .* to select all children, .. to search descendants at any depth, slices such as [0:2], and filters such as [?(@.price<10)] where @ is the current item. The result is a list of all matching values, which may be empty. JSONPath was informally described in 2007 and standardised as RFC 9535 in 2024. Implementations differ on edge cases, particularly filters. This tool uses the jsonpath-plus library with its safe expression mode, so filter expressions are evaluated by a restricted built-in evaluator instead of JavaScript eval.

How to use JSONPath Playground

  1. Enter the query Type a JSONPath expression in the JSONPath query field. It starts as $..*.
  2. Paste JSON Put the document in the JSON pane. Nothing runs while it is empty.
  3. Read the matched values The Matched values (JSON array) pane shows the values only. Below it, the match count and a list of path and value for each match.
  4. Copy Use the copy and download buttons on the values pane, or Copy paths to copy just the paths.
  5. Refine Simplify or extend the query step by step until it selects what you need.

Frequently asked questions

What does $ mean?

It is the root of the document, the starting point of every query.

What is the difference between . and ..?

A single dot selects a direct child. Two dots search all descendants at any depth.

Is JSONPath standardised?

Yes, RFC 9535 from 2024 defines it. This tool uses a library with its own behaviour on some edge cases, so check your target library.

Why is the result always a list?

JSONPath returns all matches. The values pane always shows an array, even for one match.

Is it the same as jq?

No. jq is a separate language that can also transform data. JSONPath only selects.

Is my data uploaded?

No. The conversion runs in the page and the text you enter is not sent anywhere.