JSON Validator
Check whether JSON is valid. If it is not, see what is wrong and exactly where, in plain English.
JSON
Result
Paste or type JSON on the left. The result appears here instantly.
Validation runs as you type, in this browser tab.
How to use the JSON Validator
- Paste your JSON or open a .json file. Validation runs as you type.
- A green status means the JSON is valid. A red status explains the first error and jumps to its line.
- Fix the error and keep going until it is valid, then format it if you want.
Examples
Input
{
"name": "Ada",
"roles": ["admin", "editor"],
}Result
Trailing comma before "}" at line 4, column 1Input
{'name': 'Ada'}Result
Expected a property name in double quotes but found a single quote (JSON strings need double quotes) at line 1, column 2What it does
- Live validation
- Errors appear as you type, with the line highlighted in the editor.
- Duplicate key warnings
- Valid JSON can still repeat a key, and most parsers then silently keep only the last value. The validator warns you.
- Structure summary
- See the number of objects, arrays and keys, and how deeply the data is nested.
- Strict RFC 8259 rules
- No comments, trailing commas, NaN or single quotes, the same rules every JSON parser enforces.
Frequently asked questions
What makes JSON invalid?
Common causes: a trailing comma, single-quoted strings, unquoted keys, comments, NaN or undefined values, and missing commas or brackets.
Is JSON with comments valid?
No. Standard JSON does not allow comments. Some tools accept "JSONC" or JSON5, but APIs and JSON.parse will reject it.
Are duplicate keys an error?
The JSON standard says keys should be unique but does not forbid duplicates, so the validator marks the JSON as valid and shows a warning.
Is my code uploaded anywhere?
No. The parser and printer run in your browser. Your code is never sent to a server, logged or stored.