Code Minifier & Beautifier
Minify HTML, CSS, and JavaScript to shrink file size, or beautify minified code back into readable, indented formatting — entirely in your browser.
Your Data Never Leaves Your Device
Every tool runs entirely in your browser. Nothing you type is uploaded, stored, or logged on our servers.
The HTML, CSS & JS Minifier / Beautifier switches between two directions for all three languages: minify strips whitespace and comments — and, for JavaScript, mangles variable names — to shrink file size for production; beautify takes compressed or messy code and reformats it with consistent indentation so it's readable again.
Minifying HTML also runs its embedded <style> and <script> blocks through the CSS and JS minifiers, while <pre> and <textarea> content is always left untouched. Everything runs locally in your browser — nothing you paste is uploaded anywhere.
FAQ
Minify strips whitespace, comments, and (for JavaScript) shortens variable names to shrink file size for production. Beautify does the opposite — it reformats compressed or messy code with consistent indentation so it's readable again.
Yes, when "Minify inline <style>/<script>" is checked. Embedded <style> blocks are run through the CSS minifier and <script> blocks (with no type, or type="module"/"text/javascript") through the JS minifier, while <pre> and <textarea> content is always left untouched.
The JS minifier (Terser) is the same engine used by most production build tools and preserves behavior — it's syntax-aware, not a blind text stripper. If your code has a genuine syntax error, minifying will fail and show the parser's error instead of producing broken output.
It renames local variables and function parameters to short, one- or two-character names for extra size savings. Turn it off if you want minified-but-still-debuggable output with your original names intact.
No. Minification and beautification both run locally in your browser — nothing you paste is sent to a server.