JSON Formatter & Validator

Beautify, minify and validate JSON — with errors pointed at the exact line.

Free No sign-up Runs in your browser Developer

JSON input

Output

Size
Keys
Max depth

Validation that points at the problem

Browsers report a JSON syntax error as a character offset and a terse message. An offset is useless when you are staring at a 200-line document, so it is resolved here to a line and column, with the offending line printed and a caret underneath it.

The wording is expanded too — "unexpected character" is accurate but unhelpful, so it names the mistakes that actually cause it: a trailing comma, a single quote instead of a double, or an unquoted key.

Duplicate keys — the quiet data loss

JSON permits the same key twice in one object, and every parser silently keeps the last one. {"a":1,"a":2} parses to {"a":2} with no complaint. That is valid, so it is not an error, but it is a silent way to lose data — this tool scans the raw text (before parsing, while the duplicates still exist) and names any it finds.

Converting to other formats

  • CSV — nested objects are flattened to parent.child columns, and values containing commas, quotes or newlines are escaped properly.
  • XML — keys that are not valid element names are sanitised, and text is entity-escaped.
  • YAML — strings are quoted only when they need it, so the output stays readable.

Everything is local

Your JSON is parsed in the browser and never uploaded, which matters when you are debugging an API response that contains tokens, customer records or anything else you would rather not paste into someone else's server.

Related tools

Browse all 45 tools