CSS minifier
Minify CSS or beautify it with consistent indentation. Choose top-level /*! ... */ comment retention, compare byte counts, and control rule restructuring.
Find & replace in input
Undo: Ctrl/Cmd+Z · Redo: Ctrl/Cmd+Shift+Z or Ctrl+Y. Up to 20 steps and 4 million retained characters in this tab. Clear discards history.
CSS minifier: how to use it
- Paste CSS or load a local stylesheet.
- Choose comment preservation and restructuring settings.
- Minify, review byte savings, and download the stylesheet.
Limits and notes
Rule restructuring is off by default. Minify flat CSS; compile nesting or preprocessors first. Unparsed rules or declarations are refused. This is not a complete CSS standards validator; original parser details may be in English. The default keeps top-level /*! ... */ comments; comments inside rules or nested blocks may be lost. Review required notices and test the result in its target browsers and application. Limit: 1 million characters.
How your privacy works →CSS minifier: common questions
Does this remove all comments?
The default keeps top-level /*! ... */ comments. Comments inside rules or nested blocks may be lost even with this setting. Review all required notices before using the result, and choose Remove all only after checking attribution requirements.
Why is restructuring optional?
Restructuring can combine and reorganize rules. The conservative default avoids that step, and you can enable it after checking your stylesheet.
Does minification validate CSS or remove unused selectors?
No. It refuses some syntax that cannot be safely parsed but can still accept recovered syntax, unknown properties or invalid values. It does not scan your pages or project for selector usage. Use appropriate project validation and usage-aware tooling separately.
Can I minify native CSS nesting?
Compile nesting to flat CSS before using Minify CSS. Unsupported nested rules can be refused. Beautify CSS may print nested source, but that does not compile it or establish minification support.