CSS Minifier
Paste CSS to minify it for production or beautify it for editing. Everything runs in your browser, so your code never leaves your machine.
About the CSS Minifier
The CSS Minifier and Beautifier strips comments and unneeded whitespace to shrink your stylesheet for production, or re-indents it into a readable form for editing. It is built for developers, WordPress and theme builders, and anyone shipping CSS. Everything runs in your browser, so your code stays private and is never uploaded.
How it works
- Paste or type your CSS into the input area.
- Click Minify to compress the CSS, or Beautify to re-indent it.
- Read the output along with the original size, output size, percent saved, and rule count.
- Click Copy to grab the result.
Features
- Minify removes comments and collapses whitespace into compact CSS.
- Beautify re-indents rules with four-space indentation and line breaks.
- Original size, output size, and percent saved shown after each run.
- Rule count so you can see how many blocks are in the output.
- One-click copy of the result.
Frequently asked questions
Is my CSS uploaded anywhere?
No. All processing happens in your browser. Nothing is sent to a server or logged.
What does minify remove?
It removes comments and whitespace that the browser does not need: line breaks, indentation, spaces around braces, colons, semicolons, and commas, and the last semicolon before a closing brace. The CSS rules and values stay the same.
What does beautify do?
It first normalizes the CSS, then re-indents each rule with four-space indentation, puts each declaration on its own line, and adds a blank line between rules so the file is easy to read and edit.
Are IE conditional comments kept?
Yes. Comments that start with /*! are preserved so license notes and conditional comments are not stripped during minify.
Does it work offline?
Once the page has loaded, minify and beautify run locally in your browser, so the tool keeps working without an active connection.