JSON Validator
Paste JSON to check it as you type. If it is invalid, you get a plain-English explanation of the likely cause — a trailing comma, single quotes, an unquoted key or a comment — with the exact position. Valid documents get a structure summary that flags duplicate keys. It checks syntax, not a schema, and runs in your browser.
Updated
How to use the JSON Validator
- 1Paste the JSON you want to check.
- 2Validation runs as you type.
- 3If it fails, read the explanation and the highlighted line.
- 4If it passes, review the structure summary underneath.
How it works
Validation uses the strict native parser, so a pass here means a pass anywhere. What this tool adds is interpretation: raw parser errors are terse and vary between engines, so common failure patterns are recognised and translated into a plain sentence naming the likely cause.
A trailing comma, a single-quoted string, an unquoted key, a stray comment, an unescaped newline inside a string and an unbalanced bracket each produce their own message rather than a generic 'unexpected token'.
When the document is valid, a summary reports its depth, the number of keys and arrays, the largest array, and any duplicate keys. Duplicates are worth flagging because JSON permits them but parsers silently keep only the last, which is a genuinely difficult bug to spot by eye.
Everything runs in this page. Nothing you paste is transmitted, logged or stored, which is what makes it safe to drop a production payload in here while you are debugging.
Tips and common mistakes
- Look for trailing commas first; they are the most common error.
- Use double quotes for keys and strings; single quotes are not valid JSON.
- Remove comments, or use a format designed for them, before parsing as JSON.
- Read the structure summary for duplicate keys, which JSON allows but most parsers resolve silently.