JSONPath Extractor
Evaluate JSONPath expressions against a JSON document entirely on-device. Supports root shorthand, dot and bracket child selectors, wildcards, array indices and slices, recursive descent for deep lookups, and a practical filter expression syntax (e.g. [?(@.price > 10.5)]). Results are returned as JSON so you can pipe matched values straight into other tools or scripts. Handles large documents without any network access.
🔒 100% Client-Side & Private — processed locally in your browser. Files never leave your device.
Options
Your result will appear here
Type or paste your input above, adjust the options, then press Run. Tip: press Ctrl+Enter to run, and ? for every shortcut.
How it works
What it does
The first non-blank line is the JSONPath expression; everything below it is the JSON document, which must parse. Matches are returned as a JSON array, indented by two spaces unless compact is on, with a note giving the number of matched nodes. Comparison operators, wildcards, slices and recursive descent all work on the parsed value.
When to use it
Handy for pulling a few fields out of a bulky API response without writing a script. Paste the response under an expression such as $.items[?(@.stock > 0)].sku and copy the resulting array straight into your own code or a spreadsheet.
The two options
compact drops the indentation so the output is one dense line, which is easier to paste into a command line. showPaths wraps each match as an object with its path and value, so you can see where a value came from in a deeply nested document.
Limitations
The filter syntax covers ==, !=, <, <=, >, >= with string, number, boolean and null literals on the right, but not script expressions. Traversal stops after one million visited nodes, and the document part must be strictly valid JSON, so trailing commas or comments will be reported as an error.
Privacy
Expressions are evaluated on-device with no request leaving the page. That is deliberate: pasted JSON often carries user records or API tokens, and none of it is uploaded or cached anywhere.
Questions
What JSONPath syntax is supported?
Root shorthand ($ or omitted), dot child (.field), bracket child (["field"]), wildcard (.* or [*]), array indices and slices ([0], [1:3]), recursive descent (..field), and filters [?(@.field OP value)] with ==, !=, <, <=, >, >= and string/number comparisons.
What happens when the expression has no matches?
An empty result [] is returned with a message in the notes; this is not a parse error.
Where must the JSON document go?
Paste the JSON as the second line/block of input, separated by a blank line from the expression. The first non-whitespace line is treated as the JSONPath expression; the remainder as JSON.
Is the filter syntax full JSONPath spec?
It covers the common operators and nested paths of the widely used JSONPath for JavaScript dialect. Advanced script expressions are not supported, but the implemented subset handles typical real-world queries.
Related tools
See categoryJSON to Go Struct
Generate idiomatic Go structs with json tags from a JSON sample, ready for encoding/json round-trips.
JSON to Zod Schema
Generate a Zod schema from a JSON sample so you can validate runtime data and infer clean types.
JSON to C# Class
Generate C# classes and record types from a JSON sample for System.Text.Json deserialization.
JSON to Swift Struct
Generate Swift Codable structs from a JSON sample so API payloads decode cleanly in iOS apps.