CSS Minifier & Beautifier
Free CSS minifier and beautifier: compress stylesheets to load faster or reformat messy CSS with clean indentation. Runs in your browser.
FreeRuns in your browserNo sign-up
Mode
Your CSS stays in your browser.
Advertisement
How to use the CSS Minifier & Beautifier
- Paste your CSS.
- Choose Minify or Beautify.
- Copy or download the result.
Why minify CSS?
CSS blocks rendering, so every byte counts. Removing comments, spaces and the last semicolon in each rule makes files smaller and pages faster.
What changes
- Comments and line breaks are removed.
- Spaces around
{ } : ; ,are dropped and the final;before}is removed. - Quoted strings and URLs are left untouched.
Beautify mode
Beautify expands minified CSS with one declaration per line and two-space indentation, which is handy when reading third-party styles.
For advanced optimisation such as merging rules, use a build tool like cssnano.
Frequently asked questions
How do I minify CSS?
Paste it, choose Minify and copy the result.
Is minified CSS safe?
Yes, only whitespace and comments are removed.
Can I make minified CSS readable again?
Yes, choose Beautify.
Does it handle media queries?
Yes, nested blocks are indented correctly.