JSON formatter and validator

A JSON formatter checks that text is valid JSON and re-indents it so it is easy to read. This one runs locally and keeps large integers exactly as written.

How to use the JSON formatter

  1. Paste JSON into the left box or open a file.
  2. Fix any error reported above the boxes.
  3. Choose 2 spaces, 4 spaces or Minified.
  4. Copy or download the result.

Why large numbers matter

Many formatters parse numbers as floating point, which silently changes integers above 9,007,199,254,740,991, such as some database IDs. This tool only changes whitespace.

Common JSON mistakes

Trailing commas, single quotes, unquoted keys and comments are not allowed in standard JSON.

Frequently asked questions

Is my JSON uploaded?

No. It is processed in your browser.

Does JSON allow comments?

No. Standard JSON has no comment syntax.

What is minified JSON?

JSON with unnecessary whitespace removed, which makes it smaller.

Related tools