Test JSONPath expressions against JSON
Write a JSONPath expression, run it against your JSON, and see the matched values. Useful for extracting fields, building filters, and debugging why a path returns nothing.
Open the tool, then paste the sample input below. Everything runs locally in your browser.
The problem
You need to pull specific values out of a JSON response, but the JSONPath you wrote returns nothing or the wrong nodes. Guessing in code is slow. Testing the expression against the actual document shows immediately what it selects so you can refine the path.
Sample input
{
"items": [
{ "sku": "A1", "price": 12, "inStock": true },
{ "sku": "B2", "price": 30, "inStock": false },
{ "sku": "C3", "price": 8, "inStock": true }
]
}
Expected output
$.items[?(@.inStock == true)].sku
[ "A1", "C3" ]
The filter keeps only in-stock items, then .sku extracts the field — returning the two matching SKUs.
How to do it
- Paste the JSON document.
- Type a JSONPath expression.
- Run it and read the matched values.
- Refine the path if it returns too much or nothing.
- Copy the working expression.
Common mistakes
- Missing the leading $ root in the expression.
- Using a filter on an object where an array was expected.
- Confusing dot notation with bracket notation for keys that contain dots.
- Expecting a single value when a path matches an array of results.
- Case-sensitive key names that do not match the document.
Related tools
Related guides
FAQ
What is a JSONPath expression?
A JSONPath expression is a query that selects nodes from a JSON document, starting from the root $. It can navigate objects, index arrays, and filter with conditions.
Why does my JSONPath return nothing?
Common causes are a missing $ root, a wrong key name, or filtering an object rather than an array. Test the path against the document to see where it breaks.
How do I filter an array with JSONPath?
Use a filter expression such as [?(@.field == value)] to keep only matching elements, then append a field selector to extract values from them.
Does a JSONPath always return one value?
No. A path can match many nodes, so the result is generally an array. A single match still returns a one-element result.
Is my JSON uploaded?
No. The expression runs against your JSON locally in your browser. Nothing is sent to a server.
JSONPath evaluation runs locally in your browser. Your JSON is not uploaded.
Query, format, diff and validate JSON and API payloads — grouped in one place.