How to validate JSON
- Paste or type JSON into the editor, or open a file. Validation runs as you type.
- If there is an error, the result shows its line, column and character offset, the surrounding lines with a caret under the problem, what it means and how to fix it.
- Click Show in editor to jump to it, or Repair it to send the text to the repair tool, which fixes most problems automatically.
What it checks
The validator follows RFC 8259 exactly: double-quoted strings and keys only, no comments, no trailing commas, no NaN or Infinity, no leading zeros, valid escape sequences and nothing after the final value. For valid JSON it also warns about things that are legal but risky: duplicate keys, integers too large for JavaScript to hold exactly, and unpaired surrogate escapes.
Frequently asked questions
Why does JSON.parse say “Unexpected token” but not where?
Browsers report a position but not why it is wrong. This validator names the actual problem, such as a trailing comma, single quotes or a missing comma, and shows the line and column.
Is the first error the only one?
A strict parser has to stop at the first error, because everything after it can be read in different ways. Fix it, or use Repair it to fix everything at once.
Are duplicate keys invalid?
They are allowed by the JSON grammar, but parsers disagree about which value wins, so the validator lists them as warnings.