JSON Formatter
Format minified or badly indented JSON into clean, readable output with your choice of indent width, right in your browser, with no upload step.
How to use
- Paste JSON into the input.
- Pick an indent width, and turn on key sorting to alphabetise object keys.
- Copy the formatted output.
A JSON formatter re-indents JSON data so you can read it. It fixes indentation and key order, not invalid syntax, so use JSON Validator first when a file will not parse.
Paste or type something above.
Questions about json formatter
- Does my JSON leave the browser?
- No. Formatting runs in JavaScript on your device. Nothing is uploaded, and the input stays in the page.
- Can it fix invalid JSON?
- No. It reports the parse error position instead. Use JSON Validator to see exactly where the syntax breaks.
- Why did my key order change?
- Key sorting is an optional switch that alphabetises object keys. Array order is never changed.
Related tools
- JSON Validator Check whether JSON is valid and see the exact line and column where the syntax breaks, plu...
- JSON Minifier Remove every space, newline, and indent from JSON to shrink the payload size, ready to pas...
- JSON to YAML Convert JSON data into YAML with correct quoting, nesting, and indentation, for config fil...