JSON Formatter

Paste JSON to pretty-print it with indentation or minify it to one line. Nothing is sent to a server.

Everything you enter is processed in your browser and is never sent to or stored on a server.

What is a JSON formatter?

It turns long single-line JSON, such as API responses or config files, into readable output with line breaks and indentation. It can also minify JSON by removing whitespace, and sorting keys makes two JSON documents easier to compare. Everything runs in your browser, so it is safe to use with company data or tokens.

How to use

  1. Paste JSON into the input box.
  2. Choose the indentation and whether to sort keys. The result appears instantly.
  3. Press Copy to grab the result. If there is a syntax error, its location is shown.

Frequently asked questions

Is my JSON sent to a server?

No. Formatting and minifying happen entirely in your browser's JavaScript, and your data is never sent or stored anywhere.

What should I do if I get an error?

The line and character of the error are shown. Trailing commas, single quotes and unquoted keys are not allowed in JSON, so check for those first. The JSON validator shows the exact spot.

Why did a large number change?

JavaScript cannot represent integers larger than 9,007,199,254,740,991 exactly, so bigger numbers may change slightly after formatting. Long IDs are safer as strings.