Skip to content

JSONPath Tester — Test JSONPath Expressions

JSON Input
JSONPath Expression
Examples
Matched Results
No matches or empty expression...

What This Tool Does

Test JSONPath expressions against your own JSON and see every match with its normalized path — evaluation runs on the jsonpath-plus engine in your browser. Paste a document, type an expression like $..book[?(@.price < 10)], and copy the results or individual paths. If you don't know the path, click any value in the interactive tree and the tool writes the expression for you.

Last updated:

This tool is provided as-is for convenience. Output should be verified before use in any production or critical context.

Agent Invocation

Best Path For Builders

Browser workflow

Runs instantly in the browser with private local processing and copy/export-ready output.

Browser Workflow

This tool is optimized for instant in-browser execution with local data handling. Run it here and copy/export the output directly.

/jsonpath-tester/

For automation planning, fetch the canonical contract at /api/tool/jsonpath-tester.json.

How to Use JSONPath Tester — Test JSONPath Expressions

  1. 1

    Paste your JSON

    Input a JSON object or array. Any valid JSON structure works: nested objects, arrays, mixed types.

  2. 2

    Enter a JSONPath expression

    Start simple: $.name (single property), $.items[0] (first array item), $.users[*].email (all email fields), $.store.books[?(@.price < 10)] (filtered results).

  3. 3

    Test and debug

    The tool instantly shows matching results as you type. Mismatched paths show no results, helping you debug syntax. Try variations until you get the right matches.

  4. 4

    Use in your code

    Once working, integrate JSONPath into your code using libraries like jsonpath-ng (Python), jsonpath (Node.js), or jq (CLI). Use for data extraction and transformation.

Frequently Asked Questions

What is JSONPath Tester?
JSONPath Tester lets you test JSONPath expressions against JSON data with real-time results. It features an interactive JSON tree with click-to-path, syntax help, and built-in examples.
How do I use JSONPath Tester?
Paste your JSON data in one panel and type a JSONPath expression in the query field. Results update in real-time as you type. Click any node in the JSON tree to auto-generate its path.
Does JSONPath Tester store or send my data?
No. All processing happens entirely in your browser. Your JSON data never leaves your device — nothing is sent to any server.
What is JSONPath used for?
JSONPath is a query language for extracting data from JSON documents, similar to XPath for XML. It is commonly used in API testing, data transformation, and configuration tools to select specific values from nested JSON structures.

How do I test a JSONPath expression against a JSON document?

Paste the JSON into the left panel and type the expression on the right — results update on every keystroke with a match count. Each match is listed with its canonical path and value, so you see not just what matched but where it lives in the document.

Step by step

  1. Paste your JSON, or load the sample bookstore document. Parse errors report the failing line number.
  2. Enter a JSONPath expression such as $.store.book[*].title, or pick one of the built-in examples covering slices, filters, and recursive descent.
  3. Read the matches: every result shows its full normalized path plus the value, each copyable on its own.
  4. Unsure of the path? Click any value in the interactive tree and the tool generates the exact expression for it — then apply it with one click.
  5. Copy all matched values out as a JSON array.

JSONPath syntax this tester evaluates

Syntax Meaning
$ Root object; @ is the current node inside filters
.key / ['key'] Child property — bracket notation for names with special characters
[n] / [n1,n2] / [start:end] / [-n:] Array index (0-based), multiple indices, slice, and negative slice from the end
[*] / .* All array elements / all object properties
.. Recursive descent — matches at any depth below the current node
[?(expr)] Filter expression evaluated per element, e.g. [?(@.price < 10)]

Syntax as evaluated by this tool's jsonpath-plus engine. Other implementations — including strict RFC 9535 parsers — differ on filter-expression details such as comparison operators and script evaluation.

What is the difference between .key and ..key?

One dot selects a direct child; two dots descend recursively. $.store.book only matches a book property directly under store, while $..author finds every author property anywhere in the document. Recursive descent is the fastest way to pull a field out of a deeply nested API response without writing the full path.

How do I filter array items by a property value?

Use a filter expression where @ refers to the item under test: $.users[?(@.active)] keeps items where the property is truthy, $..book[?(@.price < 10)] compares numbers, and $.users[?(@.role === 'admin')] matches a string exactly. [?(@.isbn)] selects items where a property merely exists.

Does my JSON leave the browser?

No. The document is parsed and queried in the page; nothing is uploaded or stored. JSON you debug with a path tester is usually a real API response or export — customer records, order data, tokens — so local-only evaluation is the safe default.