All / Developer

JSON Formatter

Pretty-print JSON with a two-space indent, and show the parse error when the text is invalid.

Format reprints the JSON with a two-space indent.

  1. 1Paste JSON.
  2. 2Press Format.
  3. 3Copy the result, or read the parse error.

About this tool

Paste JSON that arrived as one long line and press Format for a two-space indent. Invalid JSON shows the parse error and leaves your text alone.

  • The page doesn't fetch a URL
  • It doesn't validate a schema beyond the parse
  • Handy for an API body or a config blob

Questions

Does it change the order of keys?
No. Format reprints the JSON as it was, with a two-space indent.
Are comments allowed?
No. JSON does not allow comments, and the error will say so.
Does it minify?
No. This page only pretty-prints. Remove the whitespace in your editor if you need a compact file.

Ratings

No ratings yet. The average shows after 3 ratings.

Ratings come from people using this tool. Nobody is paid or rewarded for them, and written reviews are checked for spam before they appear, not for whether they are positive.

Related tools