Free CSS & HTML minifier
Minify CSS and HTML to reduce file size — see exactly how many bytes and what percentage you saved. Strips whitespace, comments and redundant characters while keeping the code valid. Everything runs in your browser: your source code is never uploaded. Perfect for production deployment and faster page loads.
How to minify CSS or HTML
- Paste your CSS or HTML into the input.
- The minified output appears instantly in the preview.
- See the original size, minified size and percentage saved.
- Copy the minified result.
Why minify for production
Every byte of whitespace, comment and optional semicolon adds up. Minifying CSS and HTML before deployment cuts file sizes by 15–30% on CSS and even more on HTML-heavy pages. Smaller files load faster, improve Core Web Vitals, and reduce bandwidth costs — all with zero effect on how the page looks or works.
What gets removed
- Whitespace, tabs and line breaks.
- Comments (both CSS
/* */and HTML<!-- -->). - Unnecessary semicolons and trailing commas in CSS.
- Redundant quotes around unquoted attribute values in HTML.
Frequently asked questions
Will minification break my code? No — the ToolCrix CSS & HTML minifier removes only whitespace and comments; selectors, rules and markup logic are untouched.
How much smaller will my files get? Typically 15–30% for CSS; HTML savings vary with content density. The ToolCrix minifier shows exact bytes and percentage saved.
Does the minifier handle JavaScript? The ToolCrix minifier focuses on CSS and HTML — for JS, use your build tool's minifier (Terser, esbuild) which can safely rename variables.
Is my source code uploaded? No — the ToolCrix CSS & HTML minifier processes everything locally in your browser, so proprietary stylesheets and templates stay private.