To format JSON, paste it into the JSON Formatter, choose an indent size and click format to get readable, indented JSON. You can also minify it to remove whitespace or sort keys alphabetically. Everything runs in your browser, so your data is never uploaded.
Follow along with the free JSON Formatter, which runs in your browser, or browse more tools in this category.
How to use the JSON Formatter
- Paste your JSON into the input box.
- Choose Beautify to indent it or Minify to compress it onto one line.
- Pick an indent size, and turn on key sorting if you want alphabetical order.
- Copy the formatted result.
Worked example
The compact input {“name”:”Ada”,”skills”:[“math”,”code”]} becomes an indented block with each key and array item on its own line when beautified.
Tips and common mistakes
- If formatting fails, the JSON is invalid; run it through the JSON Validator to see the exact line and column.
- Minify before sending JSON over the network to reduce size.
- Sort keys when comparing two JSON files so key order does not create false differences.
Frequently asked questions
Is my JSON sent to a server?
No. It is parsed and formatted locally in your browser.
What is the difference between beautify and minify?
Beautify adds indentation and line breaks for readability. Minify removes them to make the data smaller.
Why does it say my JSON is invalid?
Common causes are trailing commas, single quotes instead of double quotes, or unquoted keys. The validator pinpoints the location.