CSS Minifier and Beautifier
Paste a stylesheet to remove comments and whitespace, or to lay it out one declaration per line. The tool shows the original and new size.
Processed in your browser. Nothing you paste is sent to a server.
How to use this tool
- Paste CSS or open a .css file.
- Choose minify or beautify.
- Copy or download the result and check the size saved.
How it works
A tokenizer reads strings, comments and url() values so they are never changed. Minify removes comments (except /*! ones when kept), collapses whitespace, removes spaces around { } : ; , > and the last semicolon in a block. It does not rename, merge or reorder rules, so the result behaves exactly like the original.
Limitations
- Only safe whitespace and comment removal: no advanced optimisations such as merging rules or shortening colours.
Privacy and data
Everything happens in your browser. What you paste or open is never sent to our server, logged or stored, and the page works offline once loaded.