CSS Minifier
Minify CSS by stripping comments and whitespace and dropping redundant semicolons, without touching strings or URLs.
Runs in your browserCSS → CSS
Loading tool…
Example
/* Buttons */
.btn,
.btn:hover {
color: #fff;
background: url( "a b.png" );
margin: 0 auto;
}
@media (min-width: 600px) {
.btn { width: calc(100% - 2px); }
}.btn,.btn:hover{color:#fff;background:url("a b.png");margin:0 auto}@media (min-width:600px){.btn{width:calc(100% - 2px)}}How to use the CSS Minifier
- Paste or type your CSS into the input area, or open a file from your device.
- Adjust the options above the editor if the tool offers any.
- Review the CSS result, then copy it or download it as a file.
Privacy and limitations
- Your data is processed on your device and is not uploaded to any server.
- Values are not rewritten (for example 0px is kept), so the output is always equivalent to the input.
Related converters
JavaScript MinifierMinify JavaScript with Terser: remove whitespace and comments, shorten variable names and drop dead code.HTML MinifierMinify HTML: remove comments and collapse whitespace while preserving <pre>, <textarea> and <script> contents.CSS BeautifierBeautify minified or messy CSS into readable, consistently indented rules with one declaration per line.