JSON Validator

Check whether JSON is valid per RFC 8259 and get the exact line and column of the first error, plus duplicate key warnings.

Input

Up to 5 MiB. The file is not uploaded: it is read in your browser.

Ctrl + Enter to run

Result

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

  1. Paste the JSON or open a local file.
  2. Press Run.
  3. If there is an error, use “Go to error” to place the cursor at the exact position.
  4. Fix it and validate again.

Example

Example input
{
  "name": "Ana",
  "roles": ["admin", "beta"],
}
Result
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.

Related tools

References