Beautify or minify HTML, CSS, and JavaScript/TypeScript — all in your browser.
A free, in-browser HTML, CSS, and JavaScript/TypeScript beautifier and minifier. Paste messy or minified code and instantly switch between clean, readable formatting and a tight production build. Built on battle-tested libraries — js-beautify for formatting, terser for JS/TS minification, csso for CSS, and html-minifier-terser for HTML — with everything running locally in your browser. Your source code never leaves your device.
Pick a language
Choose HTML, CSS, or JavaScript/TypeScript. The tool uses the right engine for each language under the hood.
Choose a mode
Toggle between Beautify (readable, indented output) and Minify (compact, production-ready output).
Tune the options
Set indent size, keep blank lines when beautifying, or enable identifier mangling for extra JS compression.
Paste and click
Drop your code into the input area, hit Beautify or Minify, and grab the result via Copy or Download.
No. All beautification and minification happens locally in your browser using js-beautify, terser, csso, and html-minifier-terser. Nothing is sent to a server.
For formatting and minification of the JavaScript-compatible subset, yes — TypeScript-annotated code is handled by the JS engine. For strict type-stripping or compilation, use a dedicated TypeScript compiler instead.
Minifiers can only shrink what they see. Single small snippets won't benefit much from mangling, and HTML/CSS have less compressible redundancy than JavaScript. For real gains, minify full files and enable identifier mangling for JS.
By default Terser mangles only local variables and function parameters, not top-level names or properties. If you rely on specific public names, double-check your output or disable mangling.
Yes. Full documents (including <!DOCTYPE>, <head>, and <body>) are supported for both beautification and minification. Inline CSS and JS inside <style> and <script> tags are minified too when you minify HTML.