How to minify or beautify CSS
- Paste your CSS into the Your CSS box, drop a .css file onto it, or press Open file. Press Try an example to see a sample stylesheet.
- Choose Minify or Beautify. For Minify, decide whether to keep Restructure and the
Keep /*! … */ commentsswitch on. For Beautify, pick an indent. - Check the result on the right. The size before and after, with the percentage saved, is shown underneath.
- Copy it or press Download .css to save the file.
Features
- Minify with csso, a structural CSS optimiser, rather than simple space stripping.
- Restructure switch to merge duplicate rules and drop overridden declarations, or keep the original rule order.
- Licence comments kept (those starting with
/*!) unless you turn that off. - Beautify with Prettier, with 2-space, 4-space or tab indentation.
- Syntax errors with line and column, and the offending line marked with a caret.
- Size before and after in bytes, with the percentage saved.
- Paste, drop or open a file, then copy or download the result.
Why use Fileora to minify CSS
Online minifiers often post your stylesheet to a server. Fileora doesn't: the minifier and the formatter run as JavaScript in your browser, so unreleased designs and client work stay on your machine. There is no sign-up, no size quota and no watermark comment added to your output.
The tool also tells you what went wrong. Many minifiers silently drop a rule they can't parse; here you see the exact line and column so you can fix the source.
What minification does and doesn't do
Minified CSS behaves the same as the original, it just takes fewer bytes. The minifier removes whitespace and comments, shortens colours and zero values, merges shorthand where it is safe, and removes exact duplicates. With Restructure on, it goes further and combines rules, which is where most of the extra savings come from.
It does not know which selectors your pages actually use, so unused rules stay. It does not rename classes, rewrite url() paths, inline images or change media queries. If you need those, they belong in a build step; this tool is for quick one-off files, snippets for a CMS, or checking what a build would save.
Working on the rest of the page? Compress scripts with the JavaScript minifier, tidy markup with the HTML formatter, or design a background with the CSS gradient generator.
Tips for smaller stylesheets
Serve the minified file with gzip or Brotli compression on your server; the two together save far more than either alone. Keep the readable version in your project and minify a copy, because minified CSS is hard to edit. And if a rule seems to disappear after minifying with Restructure on, check whether an identical declaration later in the file already overrides it.