JSON Path Finder
About the JSON Path Finder
This JSONPath tester evaluates a JSONPath expression against your JSON and shows every match with its exact path, updating as you type. Use it to work out the right query for a test assertion, an API gateway rule or a data pipeline before you put it in code.
What is JSONPath?
JSONPath is a query language for JSON, similar to XPath for XML. Stefan Goessner proposed it in 2007, and it was standardized as RFC 9535 in 2024. Every query starts at the root, written $, and walks down through keys and array indexes.
Tools such as Kubernetes kubectl -o jsonpath, AWS Step Functions, Postman tests, JMeter and many REST Assured or Jayway-based Java tests use JSONPath to pull values out of JSON documents.
JSONPath syntax cheat sheet
$.store.book[0].title reads one value by key and index. [-1] selects the last item, [0,2] picks a list of indexes, and [1:3] is a slice (items 1 and 2, end excluded). [*] or .* matches every child.
$..price is recursive descent: it finds every price key at any depth. Filters test each item with @ as the current node, for example $..book[?(@.price < 10)] or $..book[?(@.isbn)] to keep only items that have an isbn.
Filters support ==, !=, <, <=, >, >=, &&, ||, ! and regex matching with =~, as in [?(@.author =~ /melville/i)].
JSONPath vs JSON Pointer vs jq
JSON Pointer (RFC 6901), written like /store/book/0/title, addresses exactly one location and has no wildcards or filters. It is what JSON Schema and JSON Patch use.
jq is a full command-line language that can transform and reshape data, not just select it. JSONPath sits in between: more expressive than a pointer, but read-only and simple enough to embed in configuration.
How to Use the JSON Path Finder
- Paste your JSON into the JSON Input box, or click Load Sample for the classic bookstore example.
- Type an expression in the JSONPath Expression field, starting with $.
- Or click one of the Common Queries buttons, which are generated from the keys in your own JSON.
- Read the Query Result: each match shows its path and value, and the match count appears in the title.
- Click a highlighted path to copy it, or use the copy button to copy all matched values as a JSON array.
Frequently Asked Questions
- Is my JSON sent to a server?
- No. Parsing and querying run in your browser. Your data stays on your device.
- Why does my query return no matches?
- Keys are case-sensitive, and array indexes start at 0. Check that each step exists using a shorter query first, such as $.store, then add one segment at a time.
- How do I access a key with spaces or dashes?
- Use bracket notation with quotes, for example $['first name'] or $.data['x-request-id'].
- Does it support the RFC 9535 standard?
- It covers the core RFC 9535 selectors and the common Goessner-style filter syntax, including ?(@.price < 10). Function extensions such as length() or match() are not supported; use the =~ regex operator instead.
- What does the double dot .. mean?
- It is recursive descent. $..name returns every name key anywhere in the document, at any depth.
- Are results shown in document order?
- Yes. Matches are returned in the order they appear in the JSON, and up to 500 are listed individually; the full result is always in the JSON output box.