Developer Tools · free · no sign-up
JSON Validator
Check whether your JSON is valid and find the exact line of any error. You can also format, minify and auto-fix common mistakes.
JSON Validator Pro
Professional syntax diagnostics and structural health check
READY
0
1
About the JSON Validator
Check whether your JSON is valid and find the exact line of any error. You can also format, minify and auto-fix common mistakes.
How to use the JSON Validator
- Paste your JSON, or use Valid Sample or Error Sample to see how errors are reported.
- Press Deep Check & Validate. The Status and Lines panels show the result.
- Use Format, Minify or Smart Fix to tidy up or repair the JSON, then Copy.
| Problem | Fix |
|---|---|
| Trailing comma after the last item | Remove the comma |
| Single quotes around strings or keys | Use double quotes |
| Unquoted keys | Put keys in double quotes |
| Comments (// or /* */) | JSON does not allow comments |
| Missing bracket or brace | Match every { and [ with a closing } and ] |
When to use the JSON Validator
- Checking that an API response or a config file is valid before using it.
- Finding the exact place of a syntax error.
- Verifying JSON from a colleague or another system.
Common mistakes to avoid
- Assuming the data is correct because the syntax is valid. Valid JSON can still have wrong values.
- Forgetting that keys must use double quotes.
Tips
- Errors are usually reported at the point where the parser got confused, so also check the line just before it.
Frequently asked questions
Does JSON allow comments?
No. Remove them before validating, or use a format such as JSONC or YAML if you need comments.
Does validation check my data types?
Only the syntax. To check that specific fields have specific types, use a JSON Schema.
Are numbers with leading zeros valid?
No. 007 is not valid JSON. Use 7 or the string "007".