99digest is in early access — tools are free while we grow.

JSON Formatter

Beautify or minify JSON, with adjustable indent and optional alphabetical key sorting — instantly, in your browser.

Runs in your browser Private & secure
Read the guide →

Format, indent, minify or sort the keys of JSON, and see the exact line and column of any error. It runs in your browser.

Runs in your browser

How to use it

  1. Paste your JSON.
  2. Choose an indent of 2 spaces, 4 spaces or a tab.
  3. Tick minify for the compact form, or sort keys to order keys alphabetically.
  4. Copy or download the result.

Example

{"b":2,"a":[1,2,{"c":null}]} becomes an indented, readable document, or stays compact when minified. With sort keys, {"b":2,"a":1} becomes {"a": 1, "b": 2} laid out on separate lines.

Good to know

Formatting changes whitespace only, never values; key order changes only if you ask for it. JSON objects are unordered by definition, but some programs still read keys in order, so sort only when order does not matter. If the input is invalid, you get the line, column and parser message instead of output. Standard JSON has no comments or trailing commas.

See how to format JSON, the validation guide and the JSON glossary entry.

FAQs

Is it safe to paste private data?

Your data stays in your browser, but avoid pasting live secrets such as API keys into any online tool you do not control.

Can it handle very large files?

Browsers can, but the page may slow down above a few megabytes. A command-line tool suits very large files better.