JSON Formatter & Validator

Pretty-print, minify and validate JSON.

Free. Runs in your browser: nothing you enter or open is uploaded.

Paste JSON to check and format it.

Result

  

Numbers are kept exactly as written, so long IDs such as 12345678901234567890 are not rounded the way JSON.parse rounds them. If a key appears twice in one object, both are kept and shown, since that is often the bug you are looking for.

How to use it

  1. Paste JSON into the box. It is checked as you type.
  2. If it is invalid, the line and column of the first problem are shown with the line itself.
  3. Choose Format, Minify or Tree, then copy or download the result.

Questions

Why is my JSON invalid?

The usual causes are a trailing comma after the last item, single quotes instead of double quotes, keys without quotes, comments, or a missing comma between items. The error shows the exact spot.

Is my JSON sent to a server?

No. It is checked and formatted in your browser, so API responses, configuration files and tokens never leave your device.

What does sorting keys do?

It puts the keys of every object in alphabetical order, at every level. That makes two versions of the same data much easier to compare with the Diff Checker.

What is minified JSON?

The same data with every unnecessary space and line break removed. It is smaller to send and store, but hard to read, which is what Format is for.