CM
CSS/JS/HTML Minifier
Paste CSS, JS or HTML — get smaller code with comments and extra whitespace removed, along with the size saved.
Advertisement
Input
Minified Output
Advertisement
How to use — CSS/JS/HTML Minifier
- Choose the code type — CSS, JavaScript, or HTML.
- Paste your code.
- Click Minify — comments and extra whitespace are removed, and you'll see the size saved.
FAQ
What are the benefits of minifying?
File size drops 20–60% — pages load faster, which is good for both SEO and user experience. The browser doesn't need formatted code.
Can minified code change behavior?
This tool does safe minification — it removes comments and whitespace, not variable names. Still, test JS edge cases involving ASI (missing semicolons). For production builds, you might also look at tools like Terser/cssnano.
How do I make minified code readable again?
This is one-way — keep the original safely. If you need the formatted version back, use a "beautifier" tool.
What does HTML minifying do?
It removes HTML comments and extra whitespace between tags. Content inside <pre> and <textarea> is preserved.
Advertisement