← All free tools Developer tools

JSON validator & beautifier

Validate JSON content and make it look good.

Convert

About this tool

The JSON validator and beautifier checks whether JSON is valid and reformats it. Valid JSON is laid out neatly, with the indentation you choose, or minified onto one line. Invalid JSON gets an error that says what’s wrong and the line and column where it happened.

How to use the JSON validator

  1. Paste your JSON.
  2. Choose Beautify, 2 spaces, 4 spaces, tabs, or Minify.
  3. Read the result: formatted JSON marked as valid, or an error to fix.

Common JSON errors

  • Trailing commas, as in [1, 2, 3,]. JavaScript allows them; JSON doesn’t.
  • Single quotes. Strings and keys need double quotes: "name", not 'name'.
  • Keys without quotes, like {name: "Ali"}, which is JavaScript, not JSON.
  • Comments. JSON has no comments at all.
  • Missing commas or brackets, often after copying part of a file.

When it’s useful

Reading an API response that arrives on one line, checking a config file such as package.json or composer.json before saving it, and making JSON smaller with Minify before sending it. Everything happens in your browser, so private data in the JSON stays on your device.

Have a project in mind?

Have a brand or a product to grow?