JSON Validator

Check whether text is valid JSON and see the exact error, type and size.

What makes JSON valid?

Valid JSON follows a strict grammar: double-quoted keys and strings, no trailing commas, no comments, and only the literals true, false and null. This validator runs your text through the browser's native JSON.parse, so a "Valid JSON" result means any standards-compliant parser will accept it too.

Read the error, then the shape

If the text is invalid, you get the JavaScript engine's exact error message to guide the fix. If it is valid, the tool reports the detected top-level type β€” object, array, string, number, boolean or null β€” along with its size, so you can confirm the structure is what you expected.

How to use the JSON Validator

  1. Paste the JSON. Put the text you want to check into the input box.
  2. Click Validate. It also re-checks automatically as you type.
  3. Read the verdict. See "Valid JSON" or the exact syntax error.
  4. Check the shape. Confirm the reported top-level type and size.

Frequently asked questions

What is the difference from the formatter?

The validator focuses on a pass/fail verdict plus type and size; the formatter re-indents valid JSON. Both use the same native parser.

Does it accept JSON5 or comments?

No. Comments, trailing commas and unquoted keys are JSON5 or JavaScript features, not valid JSON, so they are flagged as errors.

What does "size" mean?

For an object it is the number of keys, for an array the number of items, and for a string the number of characters.

Is anything sent to a server?

No. Validation runs locally in your browser; your data never leaves the page.