JSONPath Tester
Test JSONPath online against an API response, webhook body, or fixture without uploading anything.
About JSONPath Tester
Test JSONPath online against an API response, webhook body, or fixture without uploading anything. Paste the document, type a JSONPath expression, and copy either the extracted field values or each match's RFC 9535 normalized path. This is a private scratchpad for payloads you would not paste into a SERP widget - not a bid to outrank jsonpath.com on the head term. The engine is a no-eval subset: `$`, dot and bracket children, wildcards, slices, recursive descent (`$..author`), and simple `[?()]` filters. Script selectors such as `[(@.length-1)]` are rejected, so production JSON never goes near `eval`.
How to Use JSONPath Tester
- Paste JSON or load an example. Use Format JSON if the payload arrived minified.
- Type a path that starts with `$`. Extract a field from JSON with `$.store.book[*].title`, find values at any depth with `$..author`, or run a jsonpath filter example such as `$[?(@.price < 10)]`.
- Read the match table: normalized path, JSON type, and value. Switch to Extracted JSON for a copy-ready array.
- Copy the extracted JSON into a test fixture, or copy the path list to pin the exact nodes.
- Nothing is sent to a server. Invalid JSON reports a line and column. Invalid paths fail closed instead of running as JavaScript.
JSONPath Tester Examples
Extract a field from JSON
$.store.book[*].title returns every title in the bookstore sample as a JSON array. That is the usual 'give me this field from each item' query.
Recursive descent
$..author walks the whole document and collects every author, including nested ones, without you spelling the intermediate path.
JSONPath filter example
$[?(@.price < 10)] keeps root-array items cheaper than 10. On a nested bookstore use $.store.book[?(@.price < 10)] or $..book[?(@.price < 10)]. @ is the current element. Comparisons do not coerce types: 1 == "1" is false.
Filter then extract a field
$.store.book[?(@.price < 10)].title is the two-step form: keep cheap books, then copy only the titles. Existence filters such as [?(@.isbn)] keep items that have the key.
Nested filter path
$.items[?(@.content.name == 'Candy')].content.id reaches a nested string. Put the filter on the array you want to scan, then walk back into the field you want to extract.
Frequently Asked Questions about JSONPath Tester
- How do I test JSONPath online without uploading my payload?
- Paste the JSON, type a path that starts with `$`, and read the matches. Evaluation runs in your browser with a no-eval parser. The document and expression never leave this device, which is why this page is safe for private API responses.
- What is a JSONPath filter example I can paste?
- $[?(@.price < 10)] on a root array of objects, or $.store.book[?(@.price < 10 && @.category == 'fiction')].title to extract a field after the filter. @ is the current item. == != < <= > >= && || and ! are supported. Load the Price filter chip to see it on sample data.
- How do I extract a field from JSON with JSONPath?
- Name the field after the array or filter: $.users[*].email or $.store.book[?(@.price < 10)].title. The Extracted JSON view copies those values as a JSON array. Each row also shows the normalized path so you can pin one node, such as $['store']['book'][0]['title'].
- Which JSONPath syntax does this tester support?
- The common subset: `$`, `.name`, `['name']`, `[0]`, `[-1]`, `[*]`, `[start:end:step]`, `..name` recursive descent, and simple `[?(...)]` filters. Bracket names must be quoted. There is no eval, no jsonpath-plus, and no script selector. That is narrower than a full RFC 9535 engine and safer for pasted payloads.
- Why did my JSONPath return zero matches?
- A valid expression can match nothing. Frequent causes: `$[?(...)]` on an object root (filter the array instead), a missing `$`, an unquoted bracket name, or expecting JavaScript coercion (`1 == "1"` is false here). Try `$..field` if you are unsure of the depth, then tighten the path.
- What is a normalized JSONPath?
- RFC 9535 §2.7 writes each node as `$['store']['book'][0]` - quoted names, bare indexes, no shorthand. Every match in the table is itself a valid singular query you can paste back to select that node only.
- Is this a replacement for jsonpath.com?
- No. jsonpath.com and similar evaluators own the bare 'jsonpath tester' head term. This page is for testing a JSONPath expression against your own document privately, extracting a field, and copying normalized paths. Use it when the payload should not leave the browser.
Related Tools
JSON Minifier & Formatter
Free online JSON minifier and formatter. Minify JSON to shrink payloads or beautify (pretty-print) JSON with 2-space indentation. Validates as you go - no upload required.
JSON to CSV Converter
Convert JSON to CSV and CSV to JSON in your browser. Flatten nested objects, unflatten dotted keys on the way back, NDJSON, Excel EU preset, RFC 4180. Nothing is uploaded.
JSON to TypeScript Interface Converter
Free JSON to TypeScript interface converter. Paste a JSON sample, generate nested interfaces or type aliases, and keep optional keys separate from JSON null. Nothing is uploaded.
Regex Tester
Test JavaScript regular expressions in your browser. See match groups, flags, and highlights - nothing is uploaded.