JSONPath tester
What is a Jsonpath Tester?
JSONPath is a query language for picking values out of JSON documents, similar to XPath for XML. It is used in API testing tools, Kubernetes kubectl -o jsonpath, AWS Step Functions, n8n and Postman. This tester runs an expression against your JSON and shows the matching values, so you can get the path right before putting it into code or configuration.
How to use it
- Paste a JSON document.
- Type a JSONPath expression.
- Review the matched values.
Supported syntax
$: the root..propor['prop']: a child property. Use brackets for names with spaces or special characters.[0]: an array index.[*]or.*: all children...: recursive descent, searching all levels.
Filter expressions such as [?(@.price < 10)], which some JSONPath implementations offer, are not part of this subset.
Examples
For a document like { 'store': { 'book': [ { 'title': 'Dune', 'author': 'Herbert', 'price': 9 }, { 'title': 'Emma', 'author': 'Austen', 'price': 7 } ], 'bicycle': { 'price': 120 } } }:
$.store.book[0].titlereturns Dune.$.store.book[*].authorreturns Herbert and Austen.$..pricereturns 9, 7 and 120, every price at any depth.$.store.*returns the book array and the bicycle object.
Tips
- Implementations differ in details. RFC 9535, published in 2024, standardises JSONPath, but older tools may behave slightly differently.
- Recursive descent is convenient but can match more than you expect in large documents; prefer explicit paths in production.
- kubectl uses a JSONPath variant with curly braces, such as
{.items[*].metadata.name}.
Frequently Asked Questions
What does $ mean in JSONPath?
It refers to the root of the JSON document. Every expression starts from it.
What does .. do in JSONPath?
It searches recursively at all levels, so $..price finds every price property anywhere in the document.
Are filter expressions supported?
No. This tester supports root, child, index, wildcard and recursive descent, but not filter expressions.
Is JSONPath standardised?
Yes. RFC 9535 standardised JSONPath in 2024, though older tools may differ in edge cases.