Sign up free

Minify CSS Online – Free CSS Minifier

Paste your CSS and get a smaller file, with the new size and the percentage saved shown as you go.

About CSS Minifier

Minify CSS to cut a stylesheet down to what the browser needs, so pages download a little faster. It's handy when a site has no build step: a WordPress child theme, a static landing page, or a style block you paste into a CMS. Paste the CSS or open a file, and the minified version appears as you type, with the size before and after and the percentage saved. The same site's scripts can be shrunk with the JavaScript Minifier.

Comments and whitespace are removed, and the last semicolon in each rule is dropped. Colors like #ffffff become #fff, and 0px becomes 0. License comments that start with /*! are kept, so copyright notices survive. Strings and url() values aren't touched, so file paths and quoted text stay intact. Keep your readable file for editing; if you lose it, the CSS Formatter spreads minified CSS out again. Nothing is uploaded, because it all runs in your browser.

How to use CSS Minifier

  1. 1
    Paste your CSS

    Paste the stylesheet or open a CSS file.

  2. 2
    Check the savings

    The CSS minifier updates as you type and shows the size before and after and the percentage saved.

  3. 3
    Copy or download

    Copy the minified CSS or download it as a file.

Why use Cubfile for this

  • Comments and whitespace out

    Everything the browser ignores is removed, except /*! license comments.

  • Shorter values

    #ffffff becomes #fff, 0px becomes 0, and the last semicolon in each rule goes.

  • Strings left alone

    Quoted text and url() paths are never rewritten.

  • Size before and after

    See both sizes and the percentage saved before you copy.

FAQ

CSS Minifier: questions and answers

Will minifying CSS change how my site looks?
It shouldn't. Only comments, whitespace and redundant characters go, and a shortened value such as #fff is the same color as #ffffff. Strings and url() values are left untouched.
Are license comments kept?
Yes. Comments written as /*! … */ are kept, which is the usual way to mark copyright notices that must stay in production files. All other comments are removed.
How much smaller will my CSS get?
That depends on how much whitespace and commenting the file has. The size before and after and the percentage saved appear as soon as you paste.
Do I still need gzip on my server?
Yes. Minifying and gzip or Brotli compression add up, so use both. The GZIP and Brotli Checker shows whether your server compresses CSS.
Is my CSS uploaded when I minify CSS online?
No. Minifying happens in your browser, with no sign-up and no daily limit.
Share CSS Minifier with a friendIt runs in any browser, and they can try it without signing up.

Related tools

HTML HTML FormatterIndent messy HTML so it’s easy to read.
JS JavaScript FormatterBeautify minified or messy JavaScript.
HEX Color ConverterConvert colors between HEX, RGB, HSL and CMYK, and check contrast.
CRON Cron Expression GeneratorBuild cron expressions and see the next run times in plain words.
CSS CSS FormatterTurn minified CSS into neat, readable rules.
HTML HTML MinifierShrink HTML by removing comments and extra whitespace.
HTTP HTTP Request TesterSend GET, POST and other requests to a public API and read the response.
JS JavaScript MinifierStrip comments and whitespace from JavaScript without changing how it runs.