JSON Validator

Find out exactly which line and column broke your JSON.

Runs entirely in your browser

Advertisement

Loading the tool…

Advertisement

Most JSON errors are one of four things: a trailing comma, a missing quote around a key, a single quote where a double quote belongs, or an unescaped character inside a string. This validator points at the exact line and column so you stop hunting.

Strict RFC 8259 rules apply, the same ones your parser will use. If it validates here, it will parse in your language of choice.

How to use it

  1. Paste the JSON you want to check.
  2. Read the verdict. Valid documents report their type and size.
  3. If it is invalid, jump to the reported line and column and fix the first error.

Questions

Are comments allowed in JSON?

Not in standard JSON. // and /* */ are valid in JSON5 and in config formats like tsconfig.json, but a strict parser rejects them, and so does this validator.

Are trailing commas allowed?

No. [1, 2, 3,] and {"a": 1,} are both invalid JSON, even though JavaScript accepts them. This is the single most common error people paste in.

My JSON is valid but my program still fails. Why?

Syntax and shape are different problems. A document can be perfectly valid JSON while missing the fields your code expects. For that you need schema validation, not a syntax check.

Your data stays on your device

Everything above runs inside your browser as WebAssembly compiled from Rust. Nothing you type is uploaded, logged or stored on a server. There is no server. You can load this page once, go offline, and it still works.