TinyTools

JSONPath Tester & Finder

Test and evaluate JSONPath expressions online. Query complex nested structures, filter arrays, or click nodes in the interactive tree to find JSON paths instantly.

✓ Valid JSONPath Matches: 4
0 chars 0 lines 0 B
Matching Output

                
0 chars 0 lines 0 B

JSON Developer Tools Cluster

All JSON Tools

What Is JSONPath?

JSONPath is a declarative query language designed to extract, navigate, and slice specific data fragments from JavaScript Object Notation (JSON) documents. Originally specified by Stefan Goessner and formalized in RFC 9535, JSONPath provides for JSON what XPath provides for XML: an expressive, standardized syntax for traversing deeply nested structures without writing custom recursive algorithms.

Developers, QA test automation engineers, and data analysts routinely use JSONPath in tools like Postman, REST Assured, Kubernetes kubectl output filtering, AWS Step Functions, and API gateway transformations to validate responses and extract dynamic properties.

How to Test JSONPath Expressions Online

Evaluating queries against your JSON document takes just seconds:

  1. Input JSON Payload: Paste raw JSON directly into the editor on the left or upload a .json file.
  2. Type Your JSONPath Query: Enter your expression in the top query bar (e.g. $.store.book[*].author) or pick a query pattern from the Preset Expressions dropdown.
  3. Instant Evaluation: The matching nodes, scalar values, or sub-arrays are extracted and pretty-printed in real time in the right-hand output window, complete with match counts and status badges.
  4. Copy or Export: Copy the query results directly to your clipboard or download them as a standalone JSON file.

Click to Find JSONPath

Constructing complex query syntax for deeply nested objects with mixed dictionaries and arrays can be error-prone. TinyTools includes a visual Click-to-Find Path tool. Click the Click-to-Find tab above the input editor to convert your JSON payload into an interactive visual tree. Clicking on any key or value immediately computes the exact JSONPath path expression (such as $.store.book[1].price) and inserts it into the query bar automatically.

JSONPath Syntax Reference

Master the standard operators and symbols used in JSONPath queries:

Operator Description Example Syntax Meaning
$Root object or array$The root context of the JSON payload
.keyDot-notated child property$.store.bookAccesses child property named "book"
['key']Bracket-notated child property$['store']['book']Alternative syntax supporting special characters or spaces
..keyRecursive descent search$..authorFinds all "author" properties at any nesting depth
*Wildcard selector$.store.book[*]Matches all elements or properties of the collection
[n]Array index selector$.store.book[0]Selects the first element in the array
[start:end:step]Array slice notation$.store.book[:2]Selects array elements from index 0 up to index 2
[?(@.exp)]Filter predicate expression$.store.book[?(@.price < 10)]Filters array items matching the given boolean condition

Filtering Arrays with JSONPath

Filter expressions are among JSONPath's most powerful capabilities. Denoted by [?(<expression>)], the filter evaluates an expression against every item in an array:

Common JSONPath Query Examples

Using the standard bookstore sample data, here are the most commonly utilized JSONPath expressions:

Get all authors in the store: $.store.book[*].author

["Nigel Rees", "Evelyn Waugh", "Herman Melville"]

Find all prices at any nesting depth: $..price

[8.95, 12.99, 8.99, 19.95]

Select the first book in the collection: $.store.book[0]

{"category": "reference", "author": "Nigel Rees", ...}

Filter books with price under $10: $.store.book[?(@.price < 10)]

Matches books with prices 8.95 and 8.99

Related Developer Tools

Pair your JSONPath workflows with our complete collection of client-side developer utilities:

Frequently Asked Questions

What is JSONPath?

JSONPath is a standardized query syntax for JSON documents, analogous to XPath for XML. It allows developers to selectively navigate, filter, and extract specific values, arrays, and properties from nested JSON trees.

How does Click-to-Find JSONPath work?

Switch to the "Click-to-Find" tab above the input editor and click on any property key or value in the interactive JSON tree view. TinyTools automatically computes the exact JSONPath expression and displays the matching output.

What are common JSONPath operators?

Key operators include $ (root object or array), .key (child property), ..key (recursive deep descent), [*] (wildcard matching all array elements), [0] (array index), and [?()] (filter expressions).

Can I filter array items using JSONPath?

Yes. You can filter array items using predicate filter expressions such as $.store.book[?(@.price < 10)] or $.items[?(@.category == 'fiction')].

Is my JSON data uploaded or evaluated on a server?

No. All JSONPath parsing, evaluation, and tree extraction occurs strictly client-side in your web browser. No payload data is ever sent across the network.

Related JSON Tools

Browse All JSON Tools