JSON Validator

Paste JSON to check it against the standard. If something is wrong you get the line, the column and what to change.

Input · drop a file

Parsed as JSON

Break it yourself: the six mistakes that make JSON invalid

JSON looks like JavaScript but is much stricter. Switch on a mistake and watch where a parser stops. Only the first error is reported — parsers give up at the first thing they can’t read, which is why fixing one error can reveal the next.

1{
2  "name": "Ada",
3  "active": true,
4  "room": 7
5}
✓ Valid JSON.Toggle a mistake above to see how a strict parser reacts.

What counts as valid JSON

JSON is defined by RFC 8259 and ECMA-404. It is stricter than JavaScript object syntax:

  • Keys and strings use double quotes only.
  • No trailing commas after the last item.
  • No comments of any kind.
  • Only true, false and null as literals — not undefined, NaN, True or None.
  • No leading zeros on numbers (07) and no hex.

This validator uses its own strict parser rather than just JSON.parse, so it can name the problem ("single quotes are not valid") instead of the browser's generic "Unexpected token".

Common sources of invalid JSON

Python's print(dict) output (single quotes, True/None), hand-edited config files with comments, JavaScript object literals copied from source code, and log lines that were truncated mid-document. If the error is hard to spot, the Fix with AI button proposes a repaired version you can review before using.

Questions

Does it support JSON5 or JSONC (JSON with comments)?

No — it validates strict JSON, because that is what APIs and JSON.parse accept. It will point out comments and trailing commas so you can remove them.

Does it validate against a JSON Schema?

This page checks syntax. Schema validation (required fields, types) needs your schema and is best done in your codebase with a library such as Ajv.

Why is the reported column different from my editor?

Columns count characters from 1. Tabs count as one character, so an editor that shows tabs as 4 columns will display a larger number.

Related tools