JSON Validator

Validate JSON syntax as you type and find errors fast — see the exact line and column of the problem with the faulty line highlighted. Free and private.

Paste some JSON to get started.

Runs locally in your browser. Nothing you enter is uploaded.

How to validate JSON

  1. Paste your JSON into the box. Validation runs automatically as you type.
  2. A green Valid JSON message confirms the syntax, along with the size and nesting depth.
  3. If it’s invalid, you’ll see the line and column of the first error and the faulty line with a marker under the exact position.

Examples of invalid JSON

Invalid Why Fix
{"a": 1,} Trailing comma {"a": 1}
{'a': 1} Single quotes {"a": 1}
{a: 1} Unquoted key {"a": 1}
{"a": 1 // note} Comments aren’t allowed Remove the comment

When to validate JSON

Once your JSON is valid, the JSON Formatter makes it readable.

Frequently asked questions

What are the most common JSON errors?

Trailing commas after the last item, single quotes instead of double quotes, unquoted keys, comments (JSON doesn't allow them), and unescaped line breaks or quotes inside strings.

Does this validate against a JSON Schema?

No — it checks that the text is well-formed JSON according to the JSON specification (RFC 8259). Schema validation checks structure and types, which is a separate step.

Why does my JavaScript object fail validation?

JavaScript object syntax is more relaxed than JSON. JSON requires double-quoted keys and strings and doesn't allow trailing commas, comments, undefined, functions or NaN.

More Developer tools →