Beautify or minify JSON, HTML, CSS, SQL and XML in one place. Paste your code, pick the language and copy clean, indented output.
This formatter cleans up code in five languages: JSON, HTML, CSS, SQL and XML. Select a language, paste your code on the left and the formatted version appears on the right. JSON is parsed and re-indented with two spaces, so invalid JSON shows an error message that helps you find syntax problems. HTML and XML tags are placed on separate indented lines, CSS rules get one declaration per line, and SQL statements are broken onto new lines at keywords such as SELECT, FROM, WHERE, JOIN and ORDER BY.
The Minify button does the opposite: it strips whitespace and, for CSS and HTML, removes comments to make the output as compact as possible. The formatters are lightweight and rule-based, so they work best on typical code rather than unusual edge cases. Everything runs in your browser.
It checks that JSON can be parsed. If it cannot, you see the parser error message instead of formatted output. It does not validate against a JSON Schema.
No. Only JSON, HTML, CSS, SQL and XML are supported.
No. Formatting and minifying happen in your browser.