JSONPath Query Tester

Run JSONPath expressions against any JSON document and inspect the matched results instantly. A fast online JSONPath evaluator and tester.

Query JSON with JSONPath expressions

JSONPath is a query language for JSON documents, analogous to XPath for XML. It lets you select, filter and extract values using a compact expression syntax. The online JSONPath tester evaluates expressions against any document instantly and displays all matching results.

Basic syntax

Every JSONPath expression starts with $ (the root element). Child nodes are accessed with a dot ($.name) or bracket notation ($["name"]). Array elements use numeric indices: $.items[0]. The wildcard * selects all children: $.items[*].price returns every price in the items array. The recursive descent operator .. searches all levels: $..email finds every email field anywhere in the document.

Filter expressions

Filter expressions let you select elements that match a condition: $.orders[?(@.total > 100)] returns all orders with a total over 100. The @ symbol refers to the current element being evaluated. You can combine conditions with && and ||, and use comparison operators ==, !=, <, >, <=, >=.

The tester implements the Goessner JSONPath specification, which is the basis for the standardised RFC 9535. Results are displayed as a JSON array of all matched values, making it easy to copy extracted data for use in scripts or further processing.

Frequently asked questions

What is JSONPath?+

JSONPath is a query language for JSON, similar to XPath for XML. It lets you select and filter values from a document using expressions like $.items[*].price.

Does it support filters?+

Yes. You can use wildcards, recursive descent ($..), array slices and filter expressions such as $.items[?(@.qty>1)].

How do I query nested arrays?+

Use the recursive descent operator (..) to search all levels, or use index notation. For example $.orders[*].items[*].name selects the name field from every item in every order. You can also use [?(@.field == value)] filter expressions on any array.

What operators are supported?+

The tester supports the full Goessner JSONPath spec: the root ($), child operator (.), recursive descent (..), wildcard (*), array subscripts ([n]), array slices ([start:end:step]), union ([a,b]), and filter expressions ([?(...)]). Comparison operators (==, !=, <, >, <=, >=) and the @.length function are also supported.

Is this compatible with jq?+

JSONPath and jq use different syntax and have different feature sets. JSONPath is a lighter, more widely standardised query language (RFC 9535), while jq is a full transformation language with its own syntax. Many simple queries look similar, but they are not interchangeable.

JSONPath Query Tester — Free Online Tool | JSON Toolkit