JSON Validator

Validate JSON and locate syntax errors

Confirm whether a document is valid JSON, and when it is not, find out exactly where the parser gave up. Most JSON errors come from a small set of habits carried over from JavaScript, and knowing which one you have hit usually solves it immediately.

How to use it

  1. Paste the JSON you want to check.
  2. Validation runs automatically as you type.
  3. Read the error message, which reports the position where parsing failed.
  4. Fix the issue and confirm the document validates.

Frequently asked questions

What are the most common causes of invalid JSON?

A trailing comma after the final array or object entry, single quotes instead of double, unquoted property names, comments, and unescaped line breaks inside a string. Every one of these is legal JavaScript, which is exactly why they slip through.

The reported position does not seem to match the mistake.

Parsers report where the document became unparseable, which is often just after the real error. If a quote was never closed, the failure surfaces much later. Look backwards from the reported position.

Does valid JSON mean my data is correct?

No. Validation only checks syntax. It cannot tell you whether required fields are present or values are sensible, which is what a JSON Schema validator would do.

My config file has comments and it will not validate.

JSON has no comment syntax. Formats such as JSONC and JSON5 add them, and tools like VS Code accept comments in their own config files, but strict JSON parsers reject them. Strip the comments before validating.