Developer

JSON formatter

Pretty-print or minify JSON and see the parse error if it is invalid.

Loading tool…

  1. 1 Paste JSON.
  2. 2 Format to read it, or minify to shrink it.
  3. 3 Fix the input if an error is shown.
  4. 4 Copy the result.

How it works

Paste JSON to format it with two-space indentation, or minify it onto one line. If a comma, quote, or bracket is wrong, the parser’s message is shown and the input is left as you typed it. The tool does not send the JSON anywhere, so it is a reasonable place to inspect a local payload. Do not paste secrets you would not want on the screen.

Frequently asked questions

Does it accept comments or trailing commas?

No. It accepts JSON, not JSON5. Comments and trailing commas are errors.

Will key order change?

JavaScript preserves the order of keys in an object when it parses and stringifies them.