toolgix

CSS Formatter & Minifier

Beautify CSS, SCSS or Less, or minify CSS and see the bytes saved.

Runs in your browserFree · no sign-up
01 CSS
02 Result
OPT Options
Action

How to use CSS Formatter & Minifier

  1. Paste CSS or open a .css file.
  2. Choose Minify or Format.
  3. Copy or download the result; the status line shows the size before and after.

How it works

Minify uses CSSO, an open-source CSS optimiser. It removes comments and whitespace, shortens values (#ffffff → #fff, 0px → 0, 16px 16px 16px 16px → 16px), drops overridden duplicate declarations and, with restructuring on, merges rules with identical selectors or declarations. The CSS is parsed first, so a syntax error is reported instead of producing broken output.

Format uses Prettier to print CSS, SCSS or Less with one declaration per line and consistent spacing. Formatting never changes what the styles do.

Minified CSS behaves the same in the browser while downloading faster. Restructuring is safe for standard CSS, but if your styles rely on the exact order of equally specific rules across the file, turn it off and compare. Everything runs in your browser. The text you paste is not uploaded, logged or saved, so configuration files, API responses and customer data stay on your device.

Example

The sample stylesheet shrinks by roughly half: padding:16px 16px 16px 16px becomes padding:16px, #ffffff becomes #fff, and the repeated font-weight is removed.

Frequently asked questions

Is minified CSS safe to use?

Yes. Minification removes characters the browser does not need. Keep your original for editing and serve the minified file.

How much smaller will my CSS get?

Typically 15–40% for hand-written CSS, on top of which your server’s gzip or Brotli compression still applies. The exact saving is shown after each run.

Can it minify SCSS or Less?

No. Those must be compiled to CSS first, because minifiers work on plain CSS. They can be formatted here.

Does it remove unused CSS?

No. That requires knowing your HTML. It only optimises the rules you give it.

Limitations

  • Does not remove unused selectors or add vendor prefixes.
  • SCSS and Less can be formatted but not minified or compiled.
  • The first use downloads the formatter or minifier (under 1 MB).

Last reviewed November 9, 2026. How we build and test tools.

Categories

Recent and favourites

Tools you open appear here, and tools you star with “Favourite” stay at the top. This list is kept only in this browser.

Browse all 145 tools

↑ ↓ to moveEnter to openEsc to close