{ JSON Path Tester }

// test JSONPath queries and see results instantly

Test JSONPath queries against JSON data and see matching results instantly. Supports dot notation, bracket notation, wildcards, array slices, filters, and recursive descent. Free.

HOW TO USE

  1. 01
    Paste your JSON

    Paste any valid JSON into the top panel. Click the Sample button to load a JSON bookstore example with nested arrays and objects.

  2. 02
    Enter a JSONPath query

    Type a JSONPath expression starting with $ in the query field. Click example chips to run common patterns instantly. Results update as you type.

  3. 03
    Read and copy results

    Matching values appear as a pretty-printed JSON array. Click Copy to grab the results. Recent queries are saved in the history list.

FEATURES

Full JSONPath Recursive .. Filters [?()] Array slices Wildcards Query history

USE CASES

  • $ Debug JSONPath queries before using in code
  • $ Extract specific fields from a large API response
  • $ Find all values of a key at any nesting level
  • $ Filter array items by field value
  • $ Test JSONPath filters for configuration tools

WHAT IS THIS?

JSON Path Tester evaluates JSONPath expressions against JSON data and shows matching values instantly. It implements the full JSONPath specification including dot and bracket notation, recursive descent (..), wildcards (*), array slices, union selectors, and filter expressions ([?(@.key == value)]). All processing runs in the browser, completely free.

RELATED TOOLS

FREQUENTLY ASKED QUESTIONS

What is JSONPath?

JSONPath is a query language for JSON, analogous to XPath for XML. It allows you to extract specific values from a JSON document using a path expression. JSONPath expressions start with $ representing the root, followed by a series of selectors β€” dot notation (.key), bracket notation (['key']), array indices ([0]), wildcards (*), and filter expressions ([?(@.price < 10)]). JSONPath is used in tools like AWS Step Functions, Kubernetes, and many API testing frameworks.

What is the difference between . and .. ?

A single dot (.) selects a direct child of the current node β€” it only goes one level deep. The double dot (..), known as recursive descent, searches for the specified key at any level of nesting within the current node. For example, $.store.book[0].title selects the title of the first book in the store, while $..title returns all title values anywhere in the document at any depth.

How do filter expressions work?

Filter expressions use the syntax [?(@.key operator value)] where @ represents the current array element being tested. The filter is applied to each element of an array and includes only elements for which the expression is true. Supported operators are ==, !=, <, <=, >, >=. You can also use @.key without an operator to test for the existence of a key β€” elements that have the key are included.

What is array slice notation?

Array slices use the syntax [start:end] to select a range of array elements. [0:3] selects elements at index 0, 1, and 2 (end is exclusive). [1:] selects from index 1 to the end. [:3] selects the first three elements. Negative indices count from the end: [-2:] selects the last two elements. This syntax is borrowed from Python's slice notation.

Can I select multiple keys with union syntax?

Yes. The union syntax [key1,key2] or [n,m] selects multiple elements in one step. For example, $.book[0,2] selects the first and third books. $['name','email'] selects both the name and email keys from an object. Results are returned in the order specified in the union.

What does the wildcard * select?

The wildcard * selects all children of the current node. When applied to an object, it selects all property values. When applied to an array, it selects all elements β€” equivalent to [*]. Wildcards can be chained: $.store.* selects all children of store (e.g. books, bicycle), while $.store.book[*].price selects the price of every book. The recursive wildcard $..* returns every value in the entire document.

JSON Path Tester β€” Evaluate JSONPath Queries Free Online

JSONPath is the standard way to query and extract values from JSON data. Whether you're writing filter conditions for AWS Step Functions, building Kubernetes admission webhook rules, constructing API test assertions in Postman or REST Assured, or processing JSON in a data pipeline, JSONPath expressions let you pinpoint exactly the values you need from deeply nested structures. Testing those expressions before deploying them saves debugging time.

JSONPath vs JavaScript

JSONPath provides a concise, readable way to express queries that would otherwise require multiple nested property accesses and array methods in JavaScript. The expression $.store.book[?(@.price < 10)].title is more readable and portable than the equivalent JavaScript data.store.book.filter(b => b.price < 10).map(b => b.title). JSONPath is language-agnostic β€” the same expression works in Java, Python, Go, Ruby, and any language with a JSONPath library.

Recursive Descent

The recursive descent operator (..) is one of JSONPath's most powerful features. It searches for a key or applies a selector at every level of nesting, rather than just the immediate children. $..price returns every price value in the entire document regardless of how deeply nested it is. This is particularly useful for documents with irregular or variable-depth structures where the same key may appear at different levels.

Filter Expressions in Practice

Filter expressions ([?(@.key op value)]) enable conditional selection from arrays. They are essential for queries like "find all orders with status pending", "select all users with role admin", or "get all products priced under Β£50". The @ symbol represents the current element being tested, making filter expressions self-referential. Existence filters β€” [?(@.isbn)] β€” select only elements that have a particular key, filtering out elements where the key is absent.

β˜•