JSONPath Tester
Guide: How to Fix the Most Common JSON Errors
Nothing you enter or choose here leaves your device. This tool runs in your browser.
How to use
- 1Paste your JSON into the left box.
- 2Type a JSONPath expression, or click an example.
- 3Read the matches and their paths on the right.
- 4Click Copy values to copy the results as a JSON list.
Frequently asked questions
What is JSONPath?
A query language for JSON, similar to XPath for XML. $ is the root, a dot selects a key, and [*] selects every item, so $.store.book[*].title lists every book title.
Which features are supported?
Child names, array indexes (including negative), wildcards, slices like [0:2], unions like [0,2], recursive search with .., and filters such as [?(@.price < 10 && @.category == 'fiction')].
Why do I get no matches?
Check the spelling and the case of key names, that your path starts with $, and that quotes are balanced. Filters only compare values of the same type, so 10 and "10" are different.
Does it run my filters as code?
No. Filter expressions are read by a small built-in parser, never evaluated as JavaScript, so pasted queries can't run code.
Read the guide
Learn how this works and how to get the most from it.
Developer
How to Fix the Most Common JSON Errors
Trailing commas, single quotes, unquoted keys and more. Learn to read a JSON error message and fix invalid JSON quickly.
1 min read
Related tools
JSON Formatter & Validator
Prettify, minify and validate JSON, with error line numbers.
JSON Diff
Compare two JSON documents and see what changed, ignoring key order.
JSON Schema Generator
Generate a JSON Schema from a sample JSON document.
YAML ⇄ JSON Converter
Convert YAML to JSON and JSON to YAML with error line numbers.