About the JSON Validator
The JSON Validator tells you immediately whether text is valid JSON. Valid input shows its top-level type and number of keys, plus a formatted copy. Invalid input shows your browserโs parser error, which usually points to the position of the problem.
How to use the JSON Validator
- Paste the JSON to check.
- Read the status: valid or invalid.
- For invalid JSON, fix the issue reported in the error message and check again.
Example
A typical error
{"a": 1,} is invalid because of the trailing comma. Remove it and the validator reports valid JSON.
Frequently asked questions
Does it validate against a JSON Schema?
No. It checks syntax only: whether the text is well-formed JSON.
Is a single number valid JSON?
Yes. Any JSON value, including a number, string, true, false or null, is valid on its own.
Why does the error position seem off?
The parser reports where it noticed the problem, which can be just after the real mistake, such as a missing comma on the line before.