JSON Beautifier

Beautify JSON with custom indentation, minification, and key sorting.

About the JSON Beautifier

Paste compact or messy JSON and get it neatly indented, with an option to sort keys alphabetically or to minify it back to one line.

Everything you enter is processed in your browser; nothing is uploaded or stored.

How to use it

  1. Paste your JSON into the input box.
  2. Choose the indentation, and tick Sort Keys if you want keys in alphabetical order.
  3. Press Beautify (or Minify), then Copy to Clipboard.

How JSON beautifying works

The tool parses your text as JSON, so anything that is not valid JSON is reported instead of being reformatted. The parsed data is then written out again with your chosen indentation; with Sort Keys, every object’s keys are ordered alphabetically at every level.

Values are never changed: numbers, strings, booleans and nulls come out exactly as they went in.

Example

{"name":"Asha","skills":["sql","go"],"age":24} becomes a multi-line object with each key on its own line, and with Sort Keys the order is age, name, skills.

Tips

  • Sorting keys before comparing two API responses makes differences much easier to spot.
  • If you get an error, the JSON Lint tool shows the parser’s message for the exact problem.

Frequently asked questions

What is the difference between a JSON beautifier and a JSON formatter?

They are the same thing: both add indentation and line breaks so JSON is readable.

Can it fix invalid JSON?

No. It reports invalid JSON rather than guessing; fix the error (often a trailing comma or single quotes) and try again.

Is my JSON sent anywhere?

No. Parsing and formatting happen in your browser.