Minify CSS
minify css. Strips comments and collapses whitespace via regex, not a real parser (might mishandle markup-like sequences inside string/attribute values). JS minification isn't offered here: doing it safely needs a real parser this task can't add. Runs on your device.
Runs on your device. The file is never uploaded.
Minify CSS takes a stylesheet and prints one line of shortened text instead of a file, with several inputs printed in turn. Four regular expressions do the work, so there is no parser and no class renaming. A descendant selector loses its space, which turns a :hover into a:hover and selects something else.
Questions
What does it remove?
Four passes, all regular expressions: CSS block comments are deleted, every run of whitespace collapses to a single space, spaces around { } : ; and , are removed, and a semicolon sitting directly before a closing brace is dropped. Nothing is renamed, reordered or merged, so your selectors, properties and values come out as you wrote them.
Can it break my CSS?
Yes, in two known ways. A comment sequence inside a string or a url() is stripped like any other comment. And removing the space around a colon turns a descendant selector such as "a :hover" into "a:hover", which selects something different. Check the output whenever your stylesheet has either of those shapes.
How much smaller will the file get?
Only as much as comments and indentation were costing you. A hand-written stylesheet with heavy commenting shrinks noticeably; one already produced by a build tool might barely move. There is no class renaming, no color shortening and no rule merging, which is where a full minifier finds the rest of the savings.
Can I minify several files at once?
Yes, drop as many as you like. Each is minified on its own and the results are printed as text, one after another, in the order you dropped them. The output is text on the page rather than a file per input, so copy what you need from the panel.
Why is there no JavaScript minifier here?
Because a regex pass cannot do it safely. JavaScript needs automatic semicolon insertion resolved, a regex literal told apart from a division, and template literals understood, and getting any of those wrong corrupts working code. That needs a real parser, so JS was left out of this set rather than shipped as a risk.
Does my stylesheet get uploaded?
No. The file is read into this tab, decoded as text and rewritten inside a Web Worker. Nothing is sent anywhere, so an internal stylesheet with unreleased class names or comments about a client stays on your machine. The page also works offline after the first visit.