JSONPath tester
About JSONPath Tester
The JSONPath tester runs your query against a JSON document and updates the matches as you type. Use it to find the exact path that selects the data you need before you put it in code.
Switch the input to YAML to run the same JSONPath queries on a YAML file, and switch the output to YAML if you want the matches back as YAML. The JSON Pointer mode resolves RFC 6901 pointers such as /plan/tier, the paths used by JSON Patch and JSON Schema errors.
For jq filters, use the jq tester, which runs the real jq engine. Everything here runs in your browser. Nothing is uploaded.
How it works
JSONPath basics
$ is the root. Dot notation walks into keys ($.user.name), brackets index arrays ($.items[0]), and [*] selects every element. Combine them to reach into nested data.
Filters and recursion
Recursive descent (..) finds a key at any depth. Filter expressions like [?(@.active==true)] keep only the array elements that match. Use them to query by value instead of fixed position.
JSON Pointer mode
A pointer names one exact location. Each token after a / is a key or an array index, ~1 stands for a slash and ~0 for a tilde, and an empty pointer selects the whole document. Pointers that start with # are percent-decoded first.
YAML in, JSON or YAML out
With YAML input, anchors and aliases are resolved and a file with several --- documents becomes an array. JSONPath matches always come back as an array in document order. A query that matches nothing returns an empty array, not an error.
Frequently asked questions
What is the difference between JSONPath and jq?
JSONPath is a path syntax for selecting values, standardized as RFC 9535. jq is a full language that can also reshape and compute new JSON. Use this page for JSONPath and the jq tester for jq filters.
What is the difference between JSONPath and JSON Pointer?
JSONPath is a query that can return many matches, with wildcards and filters. A JSON Pointer (RFC 6901) names exactly one location, like /users/0/name, and is what JSON Patch uses.
How do I select every item in an array?
Use the wildcard. $.items[*] returns every element, and $.items[*].id pulls one field from each.
How do I filter array elements by a condition?
Use a filter such as $.users[?(@.active==true)]. @ stands for the element being tested.
Can I run JSONPath on YAML?
Yes. Set Input to YAML. The YAML is parsed first, so the same JSONPath expressions work on Kubernetes manifests and other config files.
Is my JSON uploaded to run the query?
No. The document and the query are both processed in your browser.
Learn more
Sources & last verified
We checked this tool's behavior and the claims on this page against the specifications below on . The tool runs in your browser, so the output you see is exactly what the engine produced.
Found a wrong result or an outdated claim? Report an error and we will check it again.