CSS Minifier
Remove comments and redundant whitespace from CSS to shrink the file, keeping strings and url() values byte-identical to what you originally wrote.
How to use
- Paste CSS into the input.
- Turn on keeping comments only when you need a licence header in the output.
- Copy the single-line CSS.
A CSS minifier drops comments and collapses whitespace that a browser ignores. Property values and strings stay exactly as written, so the rendered result does not change.
Paste or type something above.
Questions about css minifier
- Does it change any values?
- No. Only comments and whitespace outside strings are removed.
- Should I keep comments in production?
- Usually no, except a licence header that has to survive minification.
- Can I use the output straight in a build?
- Yes. The result is a single line of valid CSS, ready for concatenation or gzip.
Related tools
- CSS Formatter Re-indent CSS so each declaration sits on its own line and nested at-rules are indented, w...
- HTML Minifier Strip comments and redundant whitespace from HTML to cut page weight, keeping one meaningf...
- JavaScript Minifier Strip comments and unneeded whitespace from JavaScript to cut file size, while keeping str...