Loading…
Loading…
code minifier
Remove whitespace, comments, and unnecessary characters from JavaScript, CSS, and HTML to reduce file size and improve page load performance.
Last reviewed
June 23, 2026
Before deploying a hand-written CSS file, paste it into the minifier to remove comments and whitespace. The output can be saved as a .min.css file and referenced in production while keeping the original for editing.
The tool applies language-specific minification rules: for JavaScript, it removes comments and whitespace; for CSS, it removes comments, whitespace, and redundant semicolons; for HTML, it removes whitespace between tags and inline comments.
Code is processed in the browser. Avoid minifying code that contains secrets, API keys, or credentials — minification does not obscure sensitive values.
This tool provides basic minification for quick use. For production builds, dedicated build tools like Webpack, Rollup, Vite, or cssnano provide more advanced optimisation including dead code elimination, tree shaking, and long-term caching.