Skip to content

Developer Tools

JSON Formatter

Pretty-print and minify JSON in the browser.

Your information is processed in your browser and is not uploaded to our servers.

JSON

JSON is valid.

Formatted output

About this tool

The formatter parses JSON in the browser, then reprints it with 2-space indentation or as a single minified line.

How to use

  1. Paste JSON.
  2. Beautify or minify.
  3. Copy the output.

Formula and methodology

JSON.parse followed by JSON.stringify(value, null, 2) or JSON.stringify(value).

Worked example

Minifying { "a": 1 } yields {"a":1}.

Frequently asked questions

Does this send my JSON to a server?+

No. Parsing stays in the tab.

Are comments allowed?+

Standard JSON.parse does not allow comments or trailing commas.

Guides

Related tools