CSS MINIFIER / CSSO

CSS Minifier

Structural minification, smaller than stripping spaces.

Runs locally · code is not uploaded
Options

YOUR NEXT STEP

Connect useful tools with your company workflow

Create a company account to configure website monitoring, business email and notifications, and invite your team to work together.

New companies receive a 14-day Pro trial, with no card required. Trials exclude the paid monthly credit grant.

Already have an account? Open your workspace →

How to use it

  1. Paste code, drop a file or load the sample; the language is preset for this page and can be changed.
  2. Choose format or minify and adjust indent, width and other options; the result appears on the right as you type.
  3. Copy or download the result; on an error, use "Go to error", fix it and run again.

What minification does

Minifying changes how code is written, not what it does. It typically cuts 30–70% of the size and speeds up pages; keep your source, because minified code is hard to read.

Three minifiers
OperationJavaScript(Terser)CSS(CSSO)HTML / XML / JSON
Remove comments✓✓✓
Remove whitespace and line breaks✓✓✓
Shorten variable names✓——
Merge rules, shorten colours—✓—
Drop dead code, fold constants✓——
Keep /*! licence commentsOptionalOptionalOptional

Languages and engines

Formatting uses the same open-source engines as popular editors, so results match Prettier in VS Code and your team can keep one style. Every engine loads from this site and runs in your browser.

Language
LanguageFormatCompress
HTMLPrettier 3✓ comments and whitespace
XMLXunL XML engine✓
CSS / SCSS / LessPrettier 3✓ CSSO restructuring
JavaScript / TypeScriptPrettier 3(Babel)✓ Terser (JavaScript only)
JSONPrettier 3✓ big numbers keep precision
YAMLPrettier 3— (comments kept)
SQLsql-formatter (14 dialects)—

Frequently asked questions

Is "merge duplicate rules" safe?

CSSO merges rules only when the cascade result stays the same. If a page relies on rule order and looks wrong, turn it off for basic minification only.

Is my code uploaded?

No. The engines download from this site and run in your browser; your code never passes through our servers or any third party, so it is safe for internal code and configuration.

How large can files be?

Up to 5 MB per file; above 300 KB the page waits for the button instead of formatting as you type, to keep the browser responsive.

CSS minifier practical guide and common questions

What does a CSS minifier do?

CSSO 5 removes comments and whitespace, shortens #ff0000 to red and 0px to 0, and merges rules for the same selector where the cascade result is unchanged.

Who is this for, and when is it useful?

Site builders, landing page makers and anyone speeding up a site who wants a smaller stylesheet before release.

How do I use this CSS minifier?

Paste CSS to minify with CSSO: comments and whitespace removed, colours shortened, duplicate rules merged, with the saving shown.

How should I interpret the results?

Rule merging infers order; turn it off if a page relying on override order looks wrong. /*! licence comments can be kept.

Where is the work performed, and which services receive data?

CSSO minifies stylesheets in your browser; nothing is uploaded.