Code Beautifier
Reformat messy HTML, CSS, JS and JSON with configurable style.
Files and text are processed locally in your browser. Tools that must reach the network say so explicitly.
About the Code Beautifier
Reformat minified or messy code so it is readable again. The Toolcenter Code Beautifier uses js-beautify to pretty-print HTML, CSS and JavaScript, and reformats JSON with your chosen indent size. Paste code, set the indentation, and copy or download the tidy result.
How to use it
- 1Choose JS, CSS, HTML or JSON.
- 2Paste the code you want to format.
- 3Set the indent size.
- 4Copy or download the beautified output.
Key features
- JavaScript, CSS, HTML and JSON
- Configurable indent size
- Reliable formatting via js-beautify
- Handles minified one-line input
- Runs offline
Frequently asked questions
Can it un-minify a bundled JS file?+
Yes. Paste the minified code and it re-indents and spaces it for readability, though original variable names cannot be recovered.
Does it check for syntax errors?+
For JSON it will report a parse error. For JS/CSS/HTML it formats as best it can and notes if it could not.
What indent options are there?+
Any indent size from 1 to 8 spaces.
Is my code uploaded?+
No. Formatting is local to the browser.
Also searched as
Related developer tools
JSON Formatter & Validator
Pretty-print, minify, validate and inspect JSON with a tree view.
Base64 Encoder / Decoder
Encode or decode text and files to and from Base64.
URL Encoder / Decoder
Percent-encode or decode URLs and query components.
HTML Entity Encoder / Decoder
Escape and unescape HTML entities safely.
HTML / CSS / JS Minifier
Strip whitespace and comments to shrink front-end assets.
Regex Tester
Test patterns with live match highlighting and group inspection.