JSON Validator
Input
Loading editor…
Validation Result

Paste or type JSON in the editor
to validate it

JSON Validator

Paste your JSON and get instant validation feedback. Invalid JSON is caught immediately with a clear error message from the parser. Valid JSON shows a structural breakdown — size, root type, key count, nesting depth, and more.

Real-time
Validates as you type.
Statistics
Size, depth, key count.
Error detail
Exact parser error message.
Squiggles
Inline Monaco error markers.

What makes JSON invalid?

JSON is stricter than JavaScript objects. Keys must be double-quoted strings, trailing commas are not allowed, and values must be one of: string, number, object, array, true, false, or null. Single quotes, comments, and undefined are not valid JSON.

Frequently Asked Questions

What is JSON validation?

JSON validation checks whether a string conforms to the JSON specification. It catches syntax errors like missing quotes, trailing commas, mismatched brackets, and invalid values.

Why is my JSON showing as invalid?

The most common causes are: trailing commas after the last item in an object or array, keys not wrapped in double quotes, single quotes used instead of double quotes, or comments included in the JSON (comments are not valid in JSON).

What is the difference between JSON and JavaScript objects?

JSON is stricter than JavaScript objects. JSON keys must be double-quoted strings, values can only be strings, numbers, booleans, null, arrays, or objects. JavaScript objects allow unquoted keys, single quotes, comments, functions, and undefined — none of which are valid JSON.

Does the validator show where the error is?

Yes. The validator shows the exact error message from the JSON parser, and Monaco editor highlights the error inline with a red squiggle at the problem location.

What statistics does the validator show?

For valid JSON, the validator shows file size, root type (Object, Array, etc.), total key count, maximum nesting depth, number of arrays, and line count.