JSON Validator — Free Online JSON Syntax Checker

Validate JSON syntax instantly — detailed error messages with line numbers for invalid JSON. Also formats valid JSON for review.

100% Client-Side — Your data never leaves your browser
Output will appear here...

Frequently Asked Questions

JSON Validation: Syntax Rules and Common Errors

JSON validation checks whether a string conforms to the JSON specification (RFC 8259). Valid JSON can contain one top-level value: an object {}, array [], string, number, boolean, or null. Everything else is a syntax error.

The five most common JSON errors: (1) single-quoted strings — JSON requires double quotes, (2) trailing commas — not allowed after the last element, (3) unquoted keys — all object keys must be strings, (4) comments — // comment is not valid JSON, (5) JavaScript values — undefined, NaN, Infinity are invalid JSON.

This validator uses JSON.parse() and surfaces the browser's error message, which typically includes the position of the syntax error. The right panel shows the formatted version of valid input for easy review.

Related Tools