JSONPath Tester
Write an expression, see what it matches in your data, as you type.
About this tool
Write a JSONPath expression and see what it matches in your data, as you type. Every match lists its path — $.users[0].name — next to its value, so an expression explains itself against the real document.
The supported grammar: $ root; .name and the quoted bracket form for members (needed for keys with dots); [0] indexes and negative indexes; [*] and .* wildcards; [start:end:step] slices; ..name recursive descent; and filters — [?(@.key)] for existence, [?(@.key > 2)] for comparisons.
Not implemented, deliberately: in-place expressions, parent references, and functions like length(). They break the everything-is-static promise — an expression here reads the document; it never rewrites it.
How to use it
- Paste your JSON into the document pane.
- Type an expression in the box above the matches — it evaluates live.
- Read the matches with their paths. Zero matches is a valid answer, not an error.
Worked example
The sample expression keeps the books priced under 15 and takes their titles — Reference and Handbook, with their paths. Change the number and the list changes with it.
One expression, live answer
Frequently asked questions
What is JSONPath, exactly?
$.store.book[0].title is one — the title of the first book.How do filters work?
[?(@.age > 30)] keeps array items or object members whose age exceeds 30. @ is the item being tested; the path after it is read on that item; the comparison supports numbers and strings. An existence filter — [?(@.email)] — keeps items that have the field at all.Why does my expression with length() not work?
[0:5] answers "first five" without any function.