🔍 JSONPath Tester
Live JSONPath expression evaluation against JSON data.
Last updated: November 8, 2026 · By the BoltQuickTools team
Trying a JSONPath before you put it in code
A JSONPath that looks right can still return nothing, and finding out inside a test run or a kubectl command is a slow way to debug it. This page evaluates an expression against JSON you paste and shows every match as you type.
Using the tester
- Paste your document into JSON Input. It starts filled with a bookstore sample of four books and a bicycle.
- Type a path into Expression, or click a preset such as all authors, recursive authors, last book or books cheaper than 10.
- Read the Matches panel. The line under it gives the count, for example
2 matches, or aJSON parse errorif the input is invalid.
There is no run button. Each edit re-evaluates, and Matches is always a JSON array, even for one result.
Examples against the built-in sample
Expression $..book[?(@.price<10)].title outputs:
[
"Sayings of the Century",
"Moby Dick"
]
Expression $.store['book'][0,2].author outputs:
[
"Nigel Rees",
"Herman Melville"
]
Expression $.store.book[1:3].title outputs:
[
"Sword of Honour",
"Moby Dick"
]
What the evaluator accepts
| Syntax | Behaviour here |
|---|---|
$, .name, ['name'] | Root and child access. Dot names may use only ASCII letters, digits, _ and $. |
..name | Recursive descent, shallower nodes first. |
* | All children of an array or object. |
[2], [-1], [0,2] | Index, negative index, list of numeric indexes. |
[1:3], [::2] | Slices with a positive step. |
[?(@.field op value)] | One comparison on a direct field, using ==, !=, <, >, <= or >=. |
Where it misleads you
A malformed or unsupported expression rarely produces an error. You usually just see 0 matches.
- A negative slice step hangs the tab.
[::-1]never finishes, and because evaluation is live, the hang starts as soon as you type the closing bracket. Save your work elsewhere before experimenting with it. - Filters with a colon in the value return nothing.
[?(@.u=='http://x')]gets read as a slice. A]inside a quoted value also ends the bracket early. - Compound filters usually return nothing:
&&,||, nested fields such as@.a.b, a bare existence test such as[?(@.isbn)], regular expressions, and RFC 9535 functions. One exception: when the first comparison in a compound filter uses!=, the rest is read as the value and every item passes.[?(@.price!=1 && @.price<10)]matches all four books. - Multiple names in one bracket such as
['title','price']return nothing, since unions accept only numbers. - Keys with hyphens are split at the hyphen.
$.release-datelooks upreleaseand thendate, so it can return the wrong value. Use$['release-date']. - JavaScript properties are visible.
$.store.book.lengthreturns[4], which a standard implementation would not return. - Comparisons are loose.
[?(@.v==10)]matches both the number 10 and the string"10".
To validate a document's shape rather than pull values out of it, use the JSON Schema tool. To tidy messy input first, run it through the JSON formatter. The JSON guide has background on the format.
Questions that come up while testing paths
How do I find items that have a particular field?
Compare against null. $..book[?(@.isbn!=null)] keeps items where the field exists and is not null. On the sample it returns an empty array, because no book has an isbn, and ==null returns all four.
Will a path that works here work in my library?
Simple paths usually will, but this is a small custom evaluator in the style of the original JSONPath proposal, and result order and edge cases vary between libraries. Run tricky expressions against the library you ship.
Why is my output wrapped in an array when I selected one value?
A path can match any number of nodes, so the page always prints the list of matches. $['store']['bicycle']['color'] outputs ["red"].