CSS Minifier
Paste your CSS and get a clean, compact version in a click β no upload, all in your browser.
π How it works & FAQWhat does minifying CSS do?
Minifying CSS removes everything the browser doesn't need to render your styles: comments, line breaks, indentation, and extra spaces. It also strips the last semicolon before each closing brace and collapses runs of whitespace into single spaces. The result is identical styling in far fewer bytes, which means smaller files, faster downloads, and quicker page loads for your visitors.
This tool keeps your authored code untouched in the top box and shows a compact version below, along with the exact byte counts before and after and the percentage saved. Everything happens inside your browser β your CSS is never uploaded to a server.
When should you minify?
Minify the version of CSS you ship to production, not the copy you edit. Keep a readable, commented source file for yourself and run it through the minifier as a final step before deploying. Many build tools do this automatically, but this page is handy for quick one-off files, inline snippets, code you copied from a tutorial, or any time you want to check how much weight a stylesheet is carrying.
How to use it
- Paste or type your CSS into the "Your CSS" box.
- Click Minify CSS (it also updates as you type).
- Check the before, after, and percentage-saved figures.
- Click Copy result to grab the minified output.
- Paste it into your production stylesheet or
<style>tag.
FAQ
- Does minifying change how my page looks?
- No. Minification only removes characters the browser ignores. Selectors, properties, and values are preserved exactly, so the rendered result is the same.
- Is my CSS uploaded anywhere?
- No. All processing runs locally in your browser with plain JavaScript. Nothing is sent to a server, so it is safe for private or unreleased code.
- Can I get my original formatting back?
- Not from the minified output β minifying is one-way. Always keep your readable source file and minify a copy of it.
- Does it handle comments inside strings or data URIs?
- It handles standard CSS well, including
/* */comments and whitespace. For unusual edge cases like/*literally inside a string value, review the output before shipping.