Code Beautifier
Pretty-print JSON, or indent a brace-style snippet.
Pretty-print JSON when it parses. Anything else gets a simple brace indent.
{
"name": "Nice",
"tools": [
1,
2
]
}Calculations happen in your browser.
Worked example
{"name":"Nice","tools":[1,2]} pretty-prints as indented JSON. A brace snippet that isn’t JSON is indented by braces instead, with each { and } on its own line.
FAQ
- Does it format every language?
- JSON is formatted properly when it parses. Anything else gets a simple brace indent, which suits JavaScript-like code and not Python.
- Will it fix syntax errors?
- No. Invalid JSON falls through to the brace indenter. It doesn’t repair missing commas or quotes.
- Is the code uploaded?
- No. Formatting runs in the browser.