JSON Formatter & Validator

Paste JSON to beautify it, minify it or check it for syntax errors.

Everything you enter is processed inside this browser and is never sent to a server.

How to use it

  1. Paste JSON into the box above. It is checked for syntax errors as you type.
  2. Press “Format” to pretty-print it with 2 spaces, 4 spaces or tabs.
  3. Press “Minify” to remove all whitespace and put it on one line.
  4. Tick “Sort keys” to order object keys alphabetically, which makes two JSON documents easier to compare.

Numbers stay exactly as written

Most online formatters load your JSON with JavaScript’s built-in parser and print it again. That silently changes some values:

Your JSONTypical formatterThis tool
900719925474099390071992547409929007199254740993
1.011.0
1e310001e3

This tool uses its own parser and only changes whitespace. Numbers and strings come out exactly as they went in, so large IDs, amounts and other precise values are safe.

Finding errors

When the JSON is invalid, the tool shows the line and column of the problem. Pressing “Format” also moves the cursor to that spot. The most common causes are:

Frequently asked questions

Which JSON standard does it follow?

RFC 8259, the current JSON standard. Extensions such as JSON5 or JSONC, which allow comments and trailing commas, are reported as errors.

What happens to duplicate keys?

The standard discourages duplicate keys but does not forbid them. This tool keeps every occurrence as is.

Can it handle large files?

A few megabytes is fine on a typical computer. Everything runs on your device, so speed depends on its performance.

Is my JSON uploaded?

No. Even JSON containing API keys or personal data never leaves your browser.