Skip to content
gohacks.dev
Web

CSS Beautifier and Minifier

Beautify minified CSS with one declaration per line and nested media queries indented, or minify it, keeping strings, url() values and licence comments.

Free · No sign-up · Your inputs stay in your browser

Input

Beautify or minify CSS

Output

Result

258 characters

Strings and url() values are never touched, and /*! comments survive minifying because that is where licences live. Minifying here strips whitespace and comments only; a build tool such as Lightning CSS also merges rules and shortens values.

Runs in this browser. Nothing you paste is sent to a server.

Minifying is the smaller win

Gzip and Brotli compress CSS by around 80 percent on their own, so minification adds a little on top. Unused CSS is usually the larger cost: Chrome DevTools' Coverage panel shows how much of a stylesheet a page actually uses, and Tailwind generates only the classes the code references.

What a build tool adds

Lightning CSS, which Tailwind v4 and Vite use, and cssnano also merge duplicate rules, shorten colours and values, and add vendor prefixes for your browser targets. Use this tool to read a minified file or to clean up a snippet; let the build do production output.

Share

Frequently asked questions

Will minifying break my CSS?
Whitespace and comments only are removed, and strings and url() values are untouched, so the rules mean the same thing.
Why keep /*! comments?
By convention, a comment starting with /*! carries a licence notice that must ship with the code, so minifiers keep it.
Is what I paste sent anywhere?
No. The tool runs entirely in your browser with JavaScript. Nothing you type or paste is sent to our server or stored.

Keep planning

Similar tools