JSON Validator
Validate JSON syntax and structure.
Check whether JSON is valid and find exactly where it breaks. Paste JSON and the validator either confirms it's valid, with a summary of its structure (type, number of keys and nesting depth), or reports the error with the line and column, so you can find the stray comma, missing quote or unclosed bracket. It follows the JSON standard strictly, the same way JSON.parse and most APIs do: trailing commas, comments, single quotes and unquoted keys are errors. Nothing you paste leaves your browser.
Common use cases
- Find why an API rejects a request body
- Check a config file such as package.json or a VS Code setting
- Validate JSON copied from logs or documentation
- Check that hand-edited JSON is still valid before saving
How to use
- Paste your JSON, or press Try an example to see an error report.
- Read the result: a tick for valid JSON, or the error with its line and column.
- Fix the error and the result updates.
- Use the JSON formatter to indent valid JSON so it's easier to read.
FAQ
Why is a trailing comma an error?
The JSON standard doesn't allow a comma after the last item in an object or array, even though JavaScript does. Remove it and the JSON becomes valid.
Can JSON contain comments?
Not in standard JSON. Some tools accept JSONC or JSON5 (VS Code settings, tsconfig.json), but APIs and JSON.parse don't.
Does it check my JSON against a schema?
No. It checks that the JSON is well formed, not that it has the fields your application expects.
Related tools
- JSON FormatterFormat, validate, and beautify JSON data with syntax highlighting.
- CSV ValidatorValidate CSV file structure and data consistency.
- XML ValidatorValidate XML syntax and well-formedness.
- HTML ValidatorValidate HTML markup and structure.
- Email ValidatorValidate email address format and structure.
- Domain ValidatorValidate domain name format and structure.