JSON Validator
Paste or drop a JSON file to validate its syntax. Get clear error messages with the exact line and position of any issues.
Input JSON
Validation Result
Enter or paste JSON in the input panel to validate it.
How to Use the JSON Validator
Paste your JSON into the input panel. The validator checks your JSON in real time and shows whether it is valid or invalid. If there are errors, you will see the exact position and a snippet of the surrounding code to help you find and fix the problem.
Common JSON Errors
- Trailing commas -- JSON does not allow a comma after the last item in an array or object. Example:
{"a": 1,}is invalid. - Single quotes -- JSON requires double quotes for strings.
{'key': 'value'}is invalid; use{"key": "value"}. - Unquoted keys -- All keys must be double-quoted strings.
{key: "value"}is invalid. - Missing commas -- Each key-value pair or array element must be separated by a comma.
- Comments -- JSON does not support comments. Remove any
//or/* */comments.
JSON Specification
This validator checks against the JSON specification (RFC 8259). Valid JSON must start with an object {} or array [] at the top level, though modern parsers also accept primitive values.
Tips
- If your JSON is valid but hard to read, use the JSON Formatter to beautify it.
- The validator shows statistics about your JSON including the number of keys, depth, and data size.