JSON Query
Query JSON data with JSONPath expressions — filter, extract, and search
JSON Input
Query Results
What Is JSONPath?
JSONPath is a query language for JSON, analogous to XPath for XML. It uses a concise path expression syntax to address parts of a JSON document. The RFC 9535 standardizes the JSONPath specification. A JSONPath expression always starts with $ (the root element) and uses dot notation (.key), bracket notation (['key'] or [n]), wildcards ([*]), and recursive descent (..) to traverse the document.
This tool implements a browser-based JSONPath evaluator supporting the most common operators: root ($), child (.key and ['key']), array index ([n]), wildcard ([*]), recursive descent (..), and basic filter expressions ([?(@.price < 10)]). Results are returned as a JSON array of all matching values.
How to Query JSON with JSONPath
Follow these steps to extract data from your JSON using a JSONPath expression.
Paste your JSON
Paste your JSON document into the input panel, or click Sample to load a bookstore example. The JSON must be valid before a query can be executed.
Enter a JSONPath expression
Type your JSONPath expression in the query field. Examples: $.store.book[*].author gets all book authors; $..price gets all prices at any depth; $.store.book[?(@.price < 10)] filters books under $10.
Run and copy results
Click Run Query or press Enter. The matching values are displayed as a JSON array in the results panel. Click Copy Results to copy the output.
Common Use Cases
API Response Filtering
Extract only the fields you need from a large API response without writing custom code. Use JSONPath to pull out specific nested values, arrays, or filtered subsets in one expression.
Data Exploration
When exploring an unfamiliar JSON dataset, use recursive descent ($..) to discover all occurrences of a field name at any depth — useful for understanding deeply nested data structures.
Test Assertion Generation
Generate precise test assertions by querying the exact values you want to assert in your automated tests. Copy the JSONPath expression into your test framework (Jest, Cypress, etc.) for readable, maintainable assertions.
Configuration Value Extraction
Extract specific values from large JSON configuration files — feature flags, environment-specific settings, or service endpoints — without parsing the entire document in code.
Frequently Asked Questions
What JSONPath operators are supported?
This tool supports: $ (root), .key and ['key'] (child), [n] (array index), [*] (wildcard), .. (recursive descent), and [?(@.field op value)] (filter expressions with ==, !=, <, >, <=, >=).
How is JSONPath different from SQL?
JSONPath is a path expression language for navigating hierarchical JSON data — it is not a relational query language. It does not support JOINs, GROUP BY, or aggregation. For complex transformations, consider using jq instead.
Does the evaluator support all JSONPath features?
This tool supports the most common JSONPath operators for everyday use. Advanced features like script expressions ((@.length-1)) and union operators ([0,1]) are partially supported.
Is my data sent to a server?
No. All query evaluation happens entirely in your browser. No data is transmitted anywhere.
What is the result format?
Results are returned as a JSON array. If only one value matches, it is still wrapped in an array for consistency. An empty array ([]) means no matches were found.
Related Tools
Explore more JSON querying, filtering, and validation tools.