Validate JSON syntax and check for errors.
The JSON Validator checks JSON against the strict JSON standard and reports the exact line and column of the first error, with the offending line shown and a plain-English hint for common mistakes such as trailing commas, single quotes, unquoted keys and comments. Valid JSON is summarized by size and structure.
Made for developers. Typical uses:
The text {"name":"Ada","tags":["a","b",],"active":true} is reported as invalid at line 1, column 31: Trailing comma is not allowed in JSON. The text {"a":1,"b":[1,2,{"c":null}]} is valid: the root is an object with 3 keys, 1 array and 2 objects, with a maximum depth of 3.
It checks syntax only, not whether the data matches an expected structure; use the JSON Schema Validator for that. It reports the first error, so fix it and re-check to find any others.
Accuracy: Output is tested against known inputs. For production code, review the result and run your own tests.
Expert Tip
Fix errors one at a time: the validator reports only the first problem. If your JSON came from a word processor, check for curly quotation marks, which are not valid in JSON.
The JSON Validator tests whether text is valid JSON under the strict standard (RFC 8259). It validates as you type, so there is no button to press. A valid document shows a green message with a summary of its structure. An invalid one shows the line and column of the first error, the line itself with a caret underneath the problem, a plain-English description and often a tip for fixing it. Nothing is uploaded: the check runs in your browser.
These come straight from the validator, using small test documents.
For valid JSON, the tool summarises the structure. For {"a":1,"b":[1,2,{"c":null}]}, it reports that the root is an object with 3 keys, 1 array and 2 objects, with a maximum depth of 3. That helps you check that a document is shaped as you expect, for example that an API response has an array where you thought it had an object. The "Load an example with an error" link fills the box with a document that has a trailing comma, so you can see the error display.
JSON looks like a JavaScript object but is far stricter. Property names and strings must use double quotes. Trailing commas, comments, single quotes, unquoted keys and the special numbers NaN and Infinity are all invalid. Numbers cannot have leading zeros, and only true, false and null are allowed as keywords. Many errors come from pasting a JavaScript object, a configuration file with comments, or text that was altered by a word processor, which replaces straight quotation marks with curly ones. The guide to common JSON errors goes through each case.
Syntax validity is the first level only. A document can be valid JSON and still be wrong for your purpose, for instance a missing required field or a string where a number is expected. To check structure against a definition, use the JSON Schema Validator. It also reports only the first error, so fix it and the validator moves on to the next. Read what validators catch and what they miss for the wider picture.
Once the JSON is valid, the JSON Formatter makes it readable or compact, the JSON Minifier removes whitespace, the JSON Diff Checker compares two versions, and the JSON to CSV Converter turns an array of records into a spreadsheet. Very large documents depend on your browser's memory.
Why JSON that looks fine still fails to parse: trailing commas, single quotes, comments, NaN and oversized numbers, and how to validate, format and compare it fast.
Syntax and format checks find broken markup, bad JSON and mistyped numbers, but not meaning, business rules, email deliverability or whether a URL is alive.
Explore more in Developer Tools, read the guides and articles, or see how we test our tools.
Format, beautify, and validate JSON data with proper indentation.
Best for formatting minified JSON from APIs for readability
Validate JSON data against JSON Schema specifications.
Best for confirming an API request body matches the schema documented in an OpenAPI spec before deploying
Minify and compress JSON data to reduce file size.
Best for reducing API response payload sizes
Compare two JSON objects side by side.
Best for comparing two versions of an API response to spot what changed
Convert JSON data to CSV format.
Best for turning an API response into a spreadsheet for analysis