// IT TOOLS & CALCULATORS
| 100+ TOOLS
{ } JSON FORMATTER & VALIDATOR
// Validate, prettify and minify JSON data — identify syntax errors instantly
ADVERTISEMENT
[ IN-CONTENT AD ]

JSON Formatter / Validator

Paste in minified or malformed JSON, get back something readable with the syntax error actually pointed out — instead of squinting at a single unbroken line trying to spot a missing comma. Also works the other way: format down to compact single-line JSON when you need it minified.

The syntax errors that show up constantly

  • A trailing comma after the last item — valid in JavaScript object literals, invalid in strict JSON, and the single most common reason a config file that "looks right" fails to parse
  • Single quotes instead of double quotes around strings — JSON only accepts double quotes, no exceptions
  • Unquoted property names — {name: "value"} needs to be {"name": "value"}
  • Comments — there's no such thing as a comment in JSON, despite how often people try // or /* */ out of JavaScript habit
  • undefined or NaN — neither exists in JSON. Only null, booleans, numbers, strings, arrays and objects are valid values

Why JSON won this fight

JSON beat XML for most modern API and config use because it's smaller on the wire, maps directly onto native data structures in JavaScript (and, with a library, pretty much every other language), and there's a lot less syntax to get wrong. It's now the default for REST APIs, most NoSQL databases, and a huge amount of application configuration.

Except when it isn't

Kubernetes manifests, GitHub Actions workflows, and Ansible playbooks all use YAML instead, mainly because YAML supports comments and reads more like plain configuration than a data payload. And some tooling (Rust's Cargo, Hugo) has moved to TOML for the same reason — comments matter more in a file a human edits by hand than in a payload passed between two programs. If you're moving data between a config file and an API, chances are you'll need both formats at different points, which is usually when people reach for a YAML-to-JSON converter next.