CSS Minifier
Compact CSS source without merging rules, renaming selectors, or reordering declarations.
How to use it
- Paste CSS or open a UTF-8 file. Load the example to try it.
- Select Minify CSS.
- Review the output. If an error appears, correct your input and try again.
- Copy the result or download css-minifier.css.
Conservative, syntax-based minification
CSS Tree parses and prints compact CSS. Rule order, declaration order, calc expressions, strings, and custom-property token values are preserved. Ordinary comments are removed; !, @license, and @preserve comments are retained. There is no color shortening, rule restructuring, or browser-prefix removal. Unsupported syntax may be rejected; review your stylesheet in its target browsers.
Only the required local processor is loaded when you run the tool. Large jobs run in a cancellable background worker. Source and results remain text, including scripts, markup, and URLs.