JSON formatter and validator

Paste your JSON to format, validate or minify it. Errors are explained in plain English, and common mistakes can be fixed in one click.

 

How to format JSON

  1. Paste your JSON into the input box. It’s checked as you type.
  2. Click Format to make it readable, or Minify to strip out spaces for production.
  3. Copy or download the result.

What this JSON tool does

  • Formats JSON with 2 spaces, 4 spaces or tabs, with colour highlighting
  • Validates JSON and tells you what’s wrong
  • Minifies JSON to make it as small as possible
  • Sorts keys alphabetically, handy for comparing two files
  • Fixes common mistakes: trailing commas, single quotes, unquoted keys, comments, and Python-style True, False and None

Common JSON errors

Most invalid JSON comes down to a few mistakes: a comma after the last item in a list, single quotes instead of double quotes, keys without quotes, or comments (JSON doesn’t allow them). Click Fix common mistakes and the tool will repair these for you.

Frequently asked questions

Is this JSON formatter free?

Yes. It’s free with no signup.

Is my JSON sent to a server?

No. Everything runs in your browser, so it’s safe to use with API responses and config files. Your JSON never leaves your device.

Why is my JSON invalid?

The most common causes are trailing commas, single quotes, unquoted keys and comments. The tool shows the error, and Fix common mistakes can repair most of these automatically.

What’s the difference between format and minify?

Formatting adds line breaks and indentation so JSON is easy to read. Minifying removes all unnecessary spaces so the file is as small as possible.

Scroll to Top