🔒 Runs in your browser — nothing is uploaded✓ Free, no signup

JSONPath Tester

Evaluate JSONPath expressions on your JSON directly in the browser — no upload, no tracking. Supports filters, recursive queries, and instant copy/download.

Tip: Use .. for recursive search and filters like [?(@.price < 10)].
Loading...

When should you use JSONPath?

Quick examples to help you start fast.

Extract values
Pick specific fields from large API responses.
Example: $.data.items[*].id
Debug filters
Test conditions like price, status, flags.
Example: $.store.book[?(@.price < 10)]
Recursive search
Find a key anywhere in deeply nested JSON.
Example: $..price
Get arrays for other tools
Copy output into CSV converters or formatters.
Example: $.users[*].email

JSONPath Usage

Quick reference for common operators.

$
the root object/element
@
the current object/element
. or []
child operator
..
recursive descent. JSONPath borrows this syntax from E4X.
*
wildcard. All objects/elements regardless their names.
[]
subscript operator. XPath uses it to iterate over element collections and for predicates. In Javascript and JSON it is the native array operator.
?()
applies a filter (script) expression.
()
script expression, using the underlying script engine.
Tip: Filters look like [?(@.price < 10)] and recursive search looks like $..price.

How to use the JSONPath Tester

  1. 1

    Paste your JSON

    Paste the JSON document you want to query into the Input JSON editor.

  2. 2

    Write a JSONPath expression

    Start with $ (the root). Use .key for children, [*] for every array item, .. for recursive search and [?(...)] for filters.

  3. 3

    Click Run JSONPath

    Matching values appear in the results panel along with the number of matches.

  4. 4

    Refine and copy

    Adjust the expression until you get exactly the values you need, then copy the results.

Examples

Querying a store document

JSON

{
  "store": {
    "book": [
      { "title": "A", "author": "X", "price": 8 },
      { "title": "B", "author": "Y", "price": 12 }
    ],
    "bicycle": { "price": 19 }
  }
}

Expressions → results

$.store.book[*].author
→ ["X", "Y"]

$..price
→ [8, 12, 19]

$.store.book[?(@.price < 10)].title
→ ["A"]

$.store.book[-1:]
→ [{ "title": "B", "author": "Y", "price": 12 }]

Common errors and how to fix them

No matches found
Keys are case-sensitive and must match exactly. Check the path one level at a time, e.g. $.store first, then $.store.book.
Key with spaces or dashes doesn't work
Use bracket notation: $['first-name'] or $.user['home address'] instead of dot notation.
Filter returns nothing
Filters run on array items. Put [?(...)] directly on the array and reference the item with @, e.g. $.items[?(@.qty > 0)].
Results are wrapped in an array
JSONPath always returns a list of matches, even for a single value. Take the first item if you expect exactly one result.

More from JSON Tools

Free tools that run in your browser — no signup, nothing uploaded.

JSONPath Tester FAQ

JSONPath is a query language for JSON, similar to XPath for XML. It allows you to extract specific values from deeply nested JSON structures using expressions like $.store.book[*].author.

No. All processing happens locally in your browser. Your JSON is never uploaded, stored, or sent to any server.

This tool supports common JSONPath features such as root ($), dot and bracket notation, wildcards (*), array indexes, filters like [?(@.price < 10)], and recursive descent using (..).

An empty array means the JSONPath expression did not match any value in the input JSON. Try starting with a simpler path like $.store and then refine your expression.

Yes. Enable the “Show single value” option. When the JSONPath result contains exactly one match, the tool will display the value directly instead of wrapping it in an array.

You can use the “Copy Output” button to copy the result to your clipboard, or the “Download” option to save the result as a .json file.