JSONPath Evaluator
Run JSONPath expressions against a document and see every match highlighted.
- Recent results are kept in this browser's local storage until you clear them.
History kept on this device
Recent results are kept in this browser's local storage until you clear them. - Processing happens in this page. No application server receives your input.
Runs in your browser
Processing happens in this page. No application server receives your input.
Document
Matches
Enter a document and an expression, then press Evaluate.
What this tool does
Evaluate runs a JSONPath expression against a JSON document and lists every match with its concrete path, and the document is shown as a tree with the matched nodes marked. For example, $.store.book[*].author over the bookstore document lists four rows:
$['store']['book'][0]['author']is"Nigel Rees"$['store']['book'][1]['author']is"Evelyn Waugh"$['store']['book'][2]['author']is"Herman Melville"$['store']['book'][3]['author']is"J. R. R. Tolkien"
Copy copies a compact JSON array of the paths and values. Everything runs in your browser, and nothing in the document or the expression is sent anywhere.
What it does not do
It does not read YAML, repair broken JSON, edit the document, keep saved queries, offer a download, evaluate as you type, or claim conformance with RFC 9535. Evaluate runs when you press it, or press Enter in the expression field.
Expressions and filters
- Script expressions such as
$..[(@.length-1)]are not supported, and are refused before anything runs. - A filter such as
[?(@.price<10)]uses the library's non-evaluating path: it is read by a parser, and no code is generated from it. This is risk reduction, not a guarantee: an expression can still be slow. - A filter can call only match, includes, startsWith, endsWith, indexOf, lastIndexOf, toLowerCase, toUpperCase and trim. Any other call, an assignment, and a call written
@["push"](9)are refused before the library runs. - A filter over a field that can be missing needs a guard: write
@.isbn && @.isbn.includes("0"), because one node without the field fails the whole run. - A filter over a plain value is written
@ >0, with the space, because the library rewrites@only before a dot, a space, a closing parenthesis or a bracket. - A nested filter, or a quoted string that starts with
(, is refused. - A filter reads inherited names, so
[?(@.toString)]matches every object. Nothing is called or written.
Forms
- Write
[-1:]for the last element:[-1]is not supported. - Write
[?(...)]for a filter:[?...]is not supported. - A key with a space needs the quoted form,
$['a b']. - A key that is empty, holds
],[,;,^, a comma or a quote, or is named like an operator, cannot be named in an expression.$.*still lists it, and an empty key reads""in the tree.
Reading results
- A matched node is highlighted by text, not by color: its type reads the word
match, and an ancestor reads how many matches lie below it. $.lengthover an array or a string is a row of the table with the JavaScript length, and it marks nothing in the tree.- The dialect is the library's and not RFC 9535, so slices follow it:
$.a[1:0]reads an end of0as no end, and returns every element from index 1. - A key named
~,^or like@x()is listed by$.*, but the library prints no segment for it, so its path stops short and it is not marked in the tree. - A key holding
'or[(cannot be named,$.*still lists it, and the path it prints does not run again if you paste it. - A repeated key keeps its last value, and each repeat is listed as a warning.
- Integers beyond 2^53 are evaluated as
JSON.parsereads them, so they lose precision. - A document of
null,false,0or""is valid:$gives one match and any other expression gives none. $..@number()lists nothing, while$..*@number()lists the numbers.
Limits
| Bound | Value | At the bound |
|---|---|---|
| Document size | 16.0 MB | Refused before anything is read |
| Expression length | 4,096 bytes | Refused before the library runs |
| Nesting depth | 64 levels | Refused, with the position |
| Keys | 200,000 | Refused |
| Matches | 100,000 | Refused, with no partial list |
| Output size | 16.0 MB | Refused |
| Worker time | 30 seconds | Stopped, in the background only |
| Listed repeated keys | 1,000 | The rest are counted |
| Path length | 500 characters | Cut in the table, whole when copied |
| Value cell | 500 characters | Cut in the table, whole when copied |
| Tree children | 1,000 per node | A last node counts the rest and their matches |
| Tree nodes | 20,000 | The tree is partial, and says so |
| Tree paths | 8,000,000 characters in all | The tree is partial, and says so |
| Tree label | 500 characters | Cut with an ellipsis |
| Tree value length | 200 characters | Cut with an ellipsis |
What runs in the background
- A filter always runs in the background, whatever the size of the document.
- An expression that can multiply its results, such as a union, a parent step or a second
.., runs in the background too. - A document of 8.0 KB or more runs in the background too.
- Cancel stops a run in the background. It appears only while one is running.
Scope: this covers the page itself. Your browser, operating system, clipboard, downloads, extensions, and crash recovery may keep copies, and a compromised site origin would not be protected.