How to test a JSONPath query
Paste your JSON into the left pane and type a JSONPath expression in the query box. The matches appear on the right and update on every keystroke, with a live count of how many values matched. Click Load sample for the classic bookstore document, or use the example chips to drop a working query straight into the box. Toggle Show paths to see the location of each match instead of its value. Nothing is uploaded — the JSON and the query never leave your browser.
What JSONPath actually is
JSONPath is a query language for JSON, conceived as the JSON analogue of XPath for XML. Instead of writing loops to dig a few values out of a deeply nested response, you describe the shape of what you want with a compact path expression and let the evaluator find every match. It is widely used in API testing, configuration tooling, log processing, Kubernetes (kubectl -o jsonpath), and countless integration platforms that need to pluck fields out of a payload. Learning to write a path correctly is much faster when you can see the result instantly against your real data.
A path starts at the root, written $, and then walks into the document. $.store.book[0].title reads the title of the first book; $..author finds every author anywhere in the tree; $.store.book[*].price lists every book price. The power comes from combining these selectors, and the only reliable way to get a complex one right is to try it.
Syntax reference
This tester implements the selectors people actually use day to day:
$— the root object or array..keyor['key']— a child by name (bracket form allows keys with spaces or dots)...key— recursive descent: everykeyat any depth.*or[*]— wildcard: all children of an object or array.[n]— array index, with negatives counting from the end ([-1]is the last).[a,b]— a union of indexes or keys.[start:end:step]— a Python-style slice of an array.[?(expr)]— a filter keeping only items whereexpris true.
Filter expressions
Filters are where JSONPath earns its keep. Inside [?(...)], the symbol @ refers to the current item being tested, and $ refers back to the root. You can compare a field against a literal with ==, !=, <, <=, > and >=, match it against a regular expression with =~, or test for mere existence by naming the field on its own. Clauses combine with && and ||. For example, $..book[?(@.price < 10 && @.category == 'fiction')] selects cheap fiction, $..book[?(@.isbn)] keeps only books that have an ISBN, and $..book[?(@.author =~ /tolkien/i)] matches authors by pattern. The expression is parsed and evaluated by a small dedicated interpreter — there is no eval and no code from your input is ever executed.
Why a local JSONPath tester matters
The JSON you most need to query is usually the JSON you least want to share: an API response with tokens, a config file with connection strings, an export full of customer records. Pasting that into an online evaluator ships it to someone else's server, where it may be logged or cached. A query tool should never be the thing that leaks the data you are querying.
This tester is plain JavaScript that runs inside your own browser tab. The JSON is parsed in memory, the path is evaluated by a self-contained interpreter, and the results are rendered locally — with no network request carrying your data and no account or logging. Close the tab and nothing remains. That is the gitime.dev approach across every tool: deterministic, dependency-light utilities that keep your data where it belongs.
- Live evaluation: results and match count update as you type.
- Full selector set: child, recursive descent, wildcard, index, union, slice, filter.
- Safe filters: comparisons and regex, parsed without
eval. - Path output: see exactly where each match lives.
- Everything stays on your device — no upload, no logging.
Frequently asked questions
- Is my JSON uploaded anywhere?
- No. The JSON is parsed and the query evaluated in your browser. Even large or sensitive payloads stay on your device.
- What is JSONPath?
- A query language for JSON, like XPath for XML. A path such as
$..authorselects values from a document. - Which JSONPath features are supported?
- Root, dot/bracket child, recursive descent, wildcard, index (incl. negatives), unions, slices and filters with comparisons, regex and &&/||.
- Can it show the path of each match?
- Yes. Toggle "Show paths" to output the bracket path of every match instead of the values.