JSONPath Tester — Test JSONPath Expressions
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
Paste your JSON
Input a JSON object or array. Any valid JSON structure works: nested objects, arrays, mixed types.
- 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
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
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?
How do I use JSONPath Tester?
Does JSONPath Tester store or send my data?
What is JSONPath used for?
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
- Paste your JSON, or load the sample bookstore document. Parse errors report the failing line number.
- Enter a JSONPath expression such as
$.store.book[*].title, or pick one of the built-in examples covering slices, filters, and recursive descent. - Read the matches: every result shows its full normalized path plus the value, each copyable on its own.
- 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.
- 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.