JSONPath Query — JSONPath is the query language for JSON — it lets you pull a single value out of a deeply nested response, filter an array of records to those that match a condition, or count how many items have a particular shape. It plays the same role for JSON that XPath plays for XML, or that jq plays at the command line.
Query runs locally in your browser. Your JSON never leaves the page.
Was JSONPath Query useful?
What is jsonpath query?
JSONPath is the query language for JSON — it lets you pull a single value out of a deeply nested response, filter an array of records to those that match a condition, or count how many items have a particular shape. It plays the same role for JSON that XPath plays for XML, or that jq plays at the command line.
This tool runs the expression against the JSON you paste and returns every match. It supports the operators AI assistants and config tools (kubectl, jq-lite, GitHub Actions ${{ jsonPath(...) }}) reach for most: $ for root, dot and bracket member access, [n] and [-1] for indexing, [*] for wildcard, $.. for recursive descent, and [?(@.key op value)] for filtering. It does not cover every corner of the JSONPath spec — it covers the parts that are useful in day-to-day work.
How to use it
-
Paste your JSON
Drop a JSON document into the input. The tool validates it and shows a tree preview below.
-
Write a JSONPath expression
Start with $, then dot/bracket through the structure. Use [*] for all items, [0] for the first, [?(@.active == true)] to filter.
-
Read the matches
Every match is shown in a list with its JSON value. The count at the top tells you how many results the expression returned.
Examples
First user name
Pull the first user's name from an array of users.
$.users[0].name
Result: "Ada Lovelace"
Active users only
Filter an array of users to those with active = true.
$.users[?(@.active == true)]
Result: [{"id":1,"name":"Ada","active":true},{"id":3,"name":"Linus","active":true}]
Every email address
Use recursive descent to find every value of any "email" key anywhere in the document.
Result: ["[email protected]", "[email protected]"]
Frequently asked questions
Related tools
JSON Formatter
Format, beautify, and validate JSON with adjustable indentation — instantly in your browser.
JSON Diff
Compare two JSON values semantically. Ignores key order, highlights added/removed/changed paths, and works with nested objects and arrays.
JSON Tree Viewer
Paste any JSON and explore it as a collapsible tree. Click any value to copy it, or copy the whole path. Free, runs in your browser, no upload.
JSON to YAML Converter
Convert JSON to clean YAML and decode YAML back to JSON. Round-trips common JSON shapes.
Last reviewed: 2026-08-26