JSON Formatter

Paste JSON to make it readable, check it for errors or shrink it to one line.

How to use JSON Formatter

  1. 1Paste your JSON into the box.
  2. 2Press Format, Minify or Validate.
  3. 3Copy or download the result. If there is an error, the message shows where it is.

About this tool

JSON is the most common format for data on the web and in apps. Machines do not mind if it is squeezed onto one line, but people find it hard to read. The formatter adds indentation so you can follow the structure, and the minifier removes spaces to make it smaller.

If your JSON has a problem such as a missing quote or an extra comma, the validator tells you what is wrong and where. You can also sort the keys alphabetically to compare two files more easily. Your data stays in your browser and is never uploaded, so it is safe to use with private content.

Frequently asked questions

Why does my JSON show an error?

Common causes are a trailing comma, single quotes instead of double quotes, or a missing bracket. The error message shows the line and column.

Is my data sent anywhere?

No. Everything is processed in your browser.

Why did a very long number change?

Browsers read JSON numbers as floating point values, so numbers with more than 15 digits can lose precision. Keep such values as text.

More text tools