JSONPath Tester
Test JSONPath expressions against JSON data and see matched results instantly
JSONPath Syntax Reference
$Root object/element.keyChild operator — access property by name['key']Bracket notation — same as dot notation[0]Array index — access element by position[0,2]Array union — select multiple indices[0:3]Array slice — select range (start:end)[*]Wildcard — all elements of array or object..Recursive descent — search all descendants..keyRecursive search — find key at any depth[?(@.price<10)]Filter — select items matching conditionPaste your JSON, type a path expression like $.orders[*].total, and get matched results right away — no libraries to install, no code to write. It is a quick scratchpad for building and testing JSONPath queries before you wire them into real projects.
The results panel updates live as you edit, so you can tweak expressions on the fly and see exactly what comes back. And everything runs in your browser. Nothing gets uploaded.
How It Works
The tool parses your JSON into a tree structure, then walks that tree according to the JSONPath expression you provide. Each operator — dot notation, brackets, wildcards, filters — narrows the selection. Results show up in real time when Live mode is on, or after you click Evaluate. The path engine runs entirely in JavaScript inside your browser tab.
Examples
Grab all book titles from an API response
You hit a bookstore API and need just the titles, nothing else.
Path: $.store.book[*].title
JSON:
{"store":{"book":[
{"title":"Moby Dick","price":8.99},
{"title":"1984","price":6.99},
{"title":"Dune","price":12.50}
]}}
["Moby Dick", "1984", "Dune"]
Filter products under $20
Your e-commerce JSON has hundreds of items. You only want the cheap ones.
Path: $.products[?(@.price<20)]
JSON:
{"products":[
{"name":"Mouse","price":12.99},
{"name":"Monitor","price":299},
{"name":"Cable","price":4.50}
]}
[
{"name":"Mouse","price":12.99},
{"name":"Cable","price":4.50}
]
Find every "id" field anywhere in nested JSON
Deeply nested response from a GraphQL endpoint. You need all ID values regardless of where they sit in the structure.
Path: $..id
JSON:
{"user":{"id":42,"orders":[
{"id":1001,"items":[{"id":"A1"}]},
{"id":1002,"items":[{"id":"B3"},{"id":"B4"}]}
]}}
[42, 1001, "A1", 1002, "B3", "B4"]
Who Uses This
Testing JSONPath queries before wiring them into API response parsers or data pipelines.
Writing assertions for REST API tests in Postman, REST Assured, or Karate DSL.
Extracting specific fields from large JSON exports without writing scripts.
Learning JSONPath syntax with instant visual feedback instead of reading dry documentation.
Common Mistakes
Every JSONPath expression starts with $. Writing store.book instead of $.store.book will return nothing or throw a syntax error. The dollar sign is not optional.
If a key has spaces, hyphens, or starts with a number, $.my-key won't work. Use bracket notation instead: $['my-key']. Dot notation only handles simple alphanumeric keys.
[*] grabs all items at the current level only. .. searches every level of nesting. Using $.data[*].id misses IDs nested deeper than one level — $..id catches them all.
Technical Details
- Processing: 100% client-side — JSON never leaves your browser
- Browser Support: Chrome, Firefox, Safari, Edge
- Supported Operators: $, ., [], [*], .., [start:end], [?()], unions
- Max Input: Limited only by your browser memory
Frequently Asked Questions
What is JSONPath and how is it different from XPath?
JSONPath does for JSON what XPath does for XML — it gives you a way to point at specific pieces of data inside a document. The syntax is different though. JSONPath uses $ for the root and dot/bracket notation for traversal, while XPath uses / slashes. If you already know XPath, you will pick up JSONPath in about ten minutes.
Is my JSON data safe when using this tool?
Yes. The entire evaluation runs in JavaScript inside your browser. Nothing gets sent to a server. You can disconnect from the internet after loading the page and it still works. Your data stays on your machine, period.
How do I filter JSON arrays by a field value?
Use the filter operator [?()]. For example, $.products[?(@.price<50)] returns only products where the price is under 50. The @ symbol refers to the current item being evaluated. You can combine conditions and use operators like ==, !=, <, >, <=, and >=.
Can I use JSONPath in Postman or REST Assured?
Absolutely. Both Postman and REST Assured support JSONPath for extracting values from API responses. You can prototype your path expression here first, confirm it returns what you expect, then paste it directly into your test scripts. Saves a lot of trial-and-error in your actual test suite.
What does the recursive descent operator (..) do?
The .. operator searches through every level of your JSON, not just the current one. So $..name finds every field called "name" no matter how deeply it is nested. It is the most powerful operator when you don't know or care about the exact structure — just be aware it can return a lot of results on large documents.