CSS minifier
About the CSS Minifier
The CSS Minifier strips comments and collapses whitespace so stylesheets are smaller. It leaves the cascade and selectors untouched.
How to use it
- Paste your CSS in the input.
- The result appears instantly with a byte counter.
- Copy or download the output.
Tips
- Use a real build tool (Vite, esbuild, PostCSS) for source maps if your team is large.
- Combine multiple minified files into one HTTP request to reduce round-trips.
Stylesheets are often written with generous spacing and comments to stay readable, but the browser does not need any of that formatting. This minifier condenses your CSS — removing whitespace and comments without touching the rules themselves — so the file you serve is smaller and downloads faster.
It is the routine optimisation applied to a stylesheet before it goes live, giving a page a small but real speed win with no change to how it looks.
How to Minify CSS
- Paste your CSS source.
- Read the minified output, with whitespace and comments removed.
- Copy it as your production stylesheet or into a build step.
Practical Use Cases
Shrink a stylesheet you serve directly to cut page weight, prepare a production version of a site or email stylesheet, and reduce the CSS bytes that need to be fetched by a visitor on a slower connection.
Preserving Behaviour
Minifying removes only formatting the browser ignores. The selectors, properties and values are kept intact, so the rendered result is unchanged while the byte count drops.
CSS minification — common questions
Will my styles still work after minifying?
Yes. The minifier removes only whitespace and comments while keeping every rule, selector and value, so the styling remains identical.
How much can I expect to save?
It depends on how much formatting you wrote in. A tidy, comment-rich stylesheet often shrinks noticeably; a machine-written one may shave less. Either way it is a safe gain.
Should I keep a readable copy?
Keep the indented original for editing and serve only the minified version, which is the usual practice as part of a build or deployment.
Similar tools
Minify your HTML by removing all the unnecessary characters.
Minify your JS by removing all the unnecessary characters.
Popular tools
Compress and optimize images for a smaller image size but still high quality.
Easily convert Days time units to Months with this easy convertor.
Find A, AAAA, CNAME, MX, NS, TXT, SOA DNS records of a host.
Count the amount of characters and words of a given text.
Generate passwords with custom length and custom settings.
Check if the URL is banned and marked as safe/unsafe by Google.