JSONPath Query
Extract and filter JSON locally with JSONPath expressions — recursive descent, slices and conditional filters; matched values and paths side by side.
$.a.b, $..a recursive descent, [0], [0,2], [1:4], [*], [?( @.price < 10 )] filters (with == != < <= > >=, && / || and existence checks). Script expressions, functions and negative indexes are not supported.>_ USAGE GUIDE
Extract and filter JSON data locally with JSONPath expressions: $.store.book[*].title grabs every title, $..price recursively finds all prices, and $..book[?(@.price<10)] filters by condition. Recursive descent, array slices, and conditional filters are all supported — and results list both the matched value and its path, so you know not only what was found but where.
- Paste your JSON: any response body or dataset you want to query
- Write an expression: start with
$.a.b, add[*]for arrays,..for recursion,[?(...)]for filters - Read values and paths: every match shows its location in the document
- Refine in real time: adjust the expression and results update instantly
Typical uses: pulling target fields out of large API responses, validating assumptions about a data structure, and rehearsing extraction expressions for automated tests. Because matches list their paths, a wrong guess tells you immediately which branch of the document you actually landed in. Parsing and querying run entirely in your browser with zero uploads.
>_ FAQ
Q1 · How does JSONPath relate to XPath?
XPath is the query language for XML (/bookstore/book/title); JSONPath ports the same idea to JSON: $ is the root (like /), . selects children, .. descends recursively, and [?(...)] filters by condition. If you know XPath, JSONPath costs almost nothing to learn — both are about pinpointing data with a single expression.
Q2 · What are the most common JSONPath expressions?
Five high-frequency patterns: $.a.b for a fixed path; $.list[*].name for a field on every array element; $..name to find all name fields at any depth; $.list[0:3] to slice the first three items; and $.list[?(@.age>18)] for conditional filtering. Combined, they cover most extraction needs — and every edit shows results instantly, so the cost of trial and error is near zero.
Q3 · What does @ mean inside a filter expression?
@ refers to the element currently being examined: [?(@.price<10)] reads as "for each element in the array, check whether its price is less than 10". Conditions can compare fields, combine with && and ||, and match strings. Think of it as the this inside a loop body and the filter syntax clicks.
Q4 · Why does my expression return no matches?
Check by likelihood: the expression must start with $; brackets [] are for arrays while dot notation is for object fields; field names with special characters need the ['field name'] form; and type mismatches in conditions matter — string comparisons need quotes. Since this tool outputs matched paths, start from a partially working expression and adjust step by step instead of guessing from scratch.
Q5 · Do JSONPath implementations differ from each other?
There is no single enforced standard: the original Goessner syntax, Jayway, and JSONPath Plus disagree on details such as in-filter functions, slice behavior, and return shapes for empty results. This tool covers the common intersection of the dialects — expressions written with intersection syntax behave the same across mainstream implementations, which makes them the safest choice for porting between languages.