JSONPath Tester — Online JSONPath Evaluator

🔒 Runs in your browser — nothing is sent to a server

JSONPath tester for live evaluation of any expression against a JSON document. Paste your JSON on the left, type a JSONPath query in the input above, and watch the matched values and concrete paths update as you type — no submit button, no upload. Wildcards (`[*]`), recursive descent (`..`), array slices (`[0:3]`), filter predicates (`[?(@.price < 10)]`) and the standard root anchor `$` all work, powered by the popular `jsonpath-plus` library. Everything runs 100% inside your browser; the JSON and the expression never leave your device, nothing is uploaded, logged or sent to any server.

Cheatsheet — JSONPath syntax
  • $ — root document
  • .field — child by name
  • ..field — recursive descent (any depth)
  • [*] — every element of array/object
  • [0] — element by index
  • [0:3] — slice (start:end)
  • [?(@.price < 10)] — filter expression
  • [?(@.tag == 'fiction')] — equality filter
  • [(@.length-1)] — last element
  • $.store.book[*].author — every book's author

Why test JSONPath in the browser

JSONPath is a small language with a lot of nuance — the difference between `[*]` and `[0:]`, the exact precedence inside a filter, the handful of operators each engine adds on top of the original spec. Reading a written-down query is rarely enough to know what it returns. A live JSONPath tester removes the doubt: paste a real document, type a candidate expression, see the matches update on every keystroke, including the concrete paths for each match. This is also the safest way to iterate on a query that will eventually run against production data — none of the JSON or the expression ever leaves your browser, so there is no risk of leaking PII to a SaaS evaluator that quietly logs requests.

How filters and recursive descent compose

The two most powerful JSONPath constructs are recursive descent (`..`) and filter expressions (`[?(…)]`). Combined, they replace whole loops of imperative code. `$..book[?(@.price < 10)].title` walks every nested object looking for `book` arrays, applies the price filter to each candidate, and returns just the titles — three operations in one expression. The JSONPath tester shows both the matched values and the paths so you can validate not only that the right data came back, but that it came back from the right places. This matters when the same key name appears in multiple parts of a payload: the path tells you which instance fired the filter.

Examples

Input
$.store.book[*].title
Output
["Invisible Cities", "Ficciones", "TAOCP"]
JSONPath tester for an array of titles
Input
$.store.book[?(@.price < 10)]
Output
[{"category":"fiction","author":"Borges","title":"Ficciones","price":8.99}]
JSONPath evaluator with a filter expression
Input
$..author
Output
["Italo Calvino", "Borges", "Donald Knuth"]
Test JSONPath online — recursive descent
Input
$.store.book[0:2].title
Output
["Invisible Cities", "Ficciones"]
JSONPath expression tester — array slice

FAQ

How do I test a JSONPath expression online?

Paste your JSON document into the editor, type a JSONPath expression in the field above and the JSONPath tester evaluates it live — every keystroke updates the matched values and the concrete paths to each match. There is nothing to submit and nothing to install. The JSON and the expression never leave your browser.

What JSONPath syntax does the evaluator support?

All common constructs: `$` for the root, `.field` and `['field']` for child access, `..` for recursive descent, `[*]` for wildcard, `[0]`/`[-1]` for index access, `[0:3]` for slices, and filter expressions like `[?(@.price < 10)]` or `[?(@.tag == 'fiction')]`. The engine is `jsonpath-plus`, which extends Stefan Goessner's original JSONPath with a few practical additions.

How are filter predicates written in JSONPath?

A filter is `[?(<expression>)]` where `@` represents the current item. Compare with `==`, `!=`, `<`, `>`, `<=`, `>=`. Combine with `&&` and `||`. Examples: `[?(@.price < 10)]` keeps items priced below 10; `[?(@.category == 'tech' && @.in_stock)]` keeps in-stock tech entries. The JSONPath tester evaluates the predicate in a sandboxed expression context for every candidate item.

What is the difference between values and paths in the result?

For each match, the JSONPath evaluator can return either the concrete *value* (the data at that location) or the *path* — a string like `$['store']['book'][0]['title']` that locates the value back inside the original document. This tester shows both: the values pane gives you the data, and the paths list gives you the locator strings, useful when feeding results into another tool or building a transformation.

How do I extract every value at any depth?

Use `..` — recursive descent. `$..price` returns every `price` field anywhere in the document, no matter how deep. Combine with filters and wildcards: `$..book[?(@.author == 'Borges')].title` finds every Borges title across the whole tree. The recursive operator is the JSONPath tester's most powerful single feature for ad-hoc data exploration.

Why is my JSONPath returning an empty list?

Three common causes: (1) the expression starts without `$` — most engines tolerate it, but quoting child names case-sensitively still matters; (2) you are using `.field` on an array — use `[*].field` instead; (3) the filter compares strings without quotes — `[?(@.tag == fiction)]` will fail, write `[?(@.tag == 'fiction')]`. Watch the live preview as you build the query — empty results usually mean a structural mismatch.

Glossary

JSONPath

JSONPath is a query language for JSON, modelled after XPath for XML. It uses `$` for the root, `.` and `['…']` for child access, `..` for recursive descent, `[*]` for wildcards, `[start:end]` for slices and `[?(…)]` for filter predicates. A JSONPath tester compiles such expressions and returns the matching values or paths inside a document. The most widely used JavaScript implementation is `jsonpath-plus`.

Recursive descent (`..`)

The `..` operator descends through every nested object and array, regardless of depth. `$..price` returns every `price` field in the document, even deep inside nested arrays. It is the difference between asking "what is at this exact path" and asking "where does this key appear at all?" — and the reason JSONPath excels at ad-hoc data exploration.

Filter expression (`[?(…)]`)

A filter expression evaluates a boolean predicate against each candidate item, keeping only those that pass. `@` refers to the current item. Operators include comparison (`==`, `<`, `>`), logical (`&&`, `||`, `!`), and existence checks (just `@.field` is truthy if the field exists with a non-falsy value). Filters are how JSONPath rivals SQL `WHERE` for in-memory JSON.

Path vs value result

JSONPath evaluators can return two parallel arrays for the same query: the *values* — the actual data at each match — and the *paths* — string locators like `$['store']['book'][0]['title']` that identify each match inside the original document. The path form is useful for building update or selection rules in tools downstream; the value form is for reading the data right now.

jsonpath-plus

`jsonpath-plus` is the most popular JavaScript JSONPath implementation. It supports the original Goessner syntax plus a handful of extensions: parent (`^`), property (`@property`), bracket scripts, named match results, and an explicit `resultType` parameter to switch between values, paths, parents and pointers. The JSONPath tester here uses it directly in the browser — no external service is involved.

Related tools