The JSON validator checks whether text follows the RFC 8259 grammar and, if not, reports the line, column and reason of the first error: trailing comma, single quotes, comment, leading zero, unescaped control character or misspelled literal.
When the JSON is valid, it still reports duplicate keys and numbers that would lose precision when read by JavaScript.
How to use it
- Paste the JSON or open a local file.
- Press Run.
- If there is an error, use “Go to error” to place the cursor at the exact position.
- Fix it and validate again.
Example
{
"name": "Ana",
"roles": ["admin", "beta"],
} Error (line 4, column 1): Trailing comma before "}" is not allowed. Limitations
- It validates syntax, not structure: no JSON Schema checks.
- It stops at the first syntax error.
- Limits: 5 MiB (desktop), 2 MiB (mobile), 100 levels.
FAQ
- Why is a trailing comma an error?
- The JSON grammar does not allow trailing commas in objects or arrays. Some lenient parsers accept them but others fail, so it is safer to remove them.
- Do columns count emoji as one or two characters?
- Columns are counted in UTF-16 code units, like JavaScript editors: an emoji outside the basic plane counts as two.