JSON Path Tester
Test a practical subset of JSONPath expressions against JSON data in your browser. Supports property selectors, indexes, wildcards, recursive descent, numeric index unions and positive-step slices.
How to use
- 1 Paste a JSON object or array into JSON Input, or load the sample to try the expression shown.
- 2 Start the path with $ and add selectors from left to right; for example, $.store.book[*].author selects every author in the book array.
- 3 Read the match count and inspect the formatted result array. A valid expression with no matches returns [].
- 4 Use Copy to take the result. Check the limitations below before reusing the expression in another JSONPath implementation.
Key features
- Evaluates each edit immediately in the browser; pasted JSON is not sent to the API
- Supports root paths, dot and quoted-key properties, array indexes, wildcards, recursive descent, numeric index unions, and positive-step slices
- Returns matches as a formatted JSON array with a count, including a clear [] when there are no matches
- Rejects zero and negative slice steps; filter expressions, script expressions, and functions are not implemented
What this JSONPath tester evaluates
JSONPath is a query syntax for selecting values from a JSON document. A path starts at $ (the root), then follows object properties or array items. This tester evaluates a practical subset in your browser. It is useful for inspecting an API response or checking a path before translating it into application code.
The feature set is deliberately stated here because this is not a full implementation of RFC 9535. JSONPath libraries differ, and an expression accepted here may still need adjustment for the query engine in your app.
Selectors supported here
| Expression | Result | Use it when |
|---|---|---|
| $.store.book | The book array | The property name is a simple identifier. |
| $['display name'] | A property with a space in its name | Dot notation cannot express the key clearly. |
| $.store.book[-1] | The final array item | You need the last item without knowing the array length. |
| $.store.book[*].author | Each book author | You need one property from every array element. |
| $..price | Every descendant price property | The nesting depth is unknown; inspect for duplicate matches. |
| $.store.book[0,2] | Array items at indexes 0 and 2 | You need specific numeric indexes. |
| $.store.book[1:4:2] | Items at indexes 1 and 3 | You need a range with a positive step. |
Read the result before copying it
Results are always displayed as a JSON array. Selecting one value still produces a one-item array; selecting no values produces []. The match count is the number of values in that array. This makes it easy to tell a single match from a query that selects several values.
Input
{"user":{"name":"Rae"}}$.user.name → ["Rae"]
No matching property
{"user":{"name":"Rae"}}$.user.email → []
Limits that affect query results
- Filter selectors such as
[?(@.price < 10)]are not evaluated. - Script expressions, functions, and property-name unions are not implemented.
- Array slices accept a positive integer step; zero and negative steps show an error.
- Quoted bracket keys work for ordinary names, but escaped quote characters inside a key are not parsed.
- Some unsupported bracket syntax can produce no matches rather than a syntax error. If a result is unexpectedly empty, check the selector against the supported list above.
For application code, verify the expression using the same JSONPath library and version that will run in production. The RFC defines the standardized query language.
Data stays in this browser
The JSON is parsed and queried by client-side code. The tool does not upload the input to an OCMA API endpoint. Avoid pasting secrets into any shared or untrusted browser session, and use the copy control only when you want to move the result elsewhere.