JSON Formatter

Paste JSON to format it, check it for errors or minify it.

How to use the json formatter

  1. Paste your JSON into the box.
  2. Choose an indent and click Format or Minify.
  3. Fix any error shown, then copy the result.

Frequently asked questions

What does a JSON formatter do?

It adds line breaks and indentation so nested objects and arrays are easy to read. Minify does the opposite, removing whitespace to make the data as small as possible.

Why is my JSON invalid?

Common causes are trailing commas, single quotes instead of double quotes, unquoted keys and comments. The error message shows the position of the first problem.

Is my JSON sent to a server?

No. Parsing and formatting use your browser built-in JSON engine, so API keys or private data in your JSON stay on your device.

Can it sort keys?

Yes. Tick "Sort keys" to order object keys alphabetically at every level, which makes two JSON files easier to compare.

More in Developer