Back

CSS Compressor

Chrome extension v1.2.2 3 min read 9 sections

Minify CSS with the CSSO engine in a full-tab editor, see how many bytes you saved, and beautify code to read it.

On this page9 sections
  1. Getting started
  2. Editor layout
  3. Compression
  4. Before and after
  5. Beautify toggles
  6. Theme
  7. Features
  8. Privacy
  9. Troubleshooting

Minify CSS with CSSO in a full-tab editor. Beautify input or output, view compression stats, and copy or download results, all locally in your browser.

TIP

Beautify messy source CSS before editing, then turn beautify off and compress for the smallest output.

CSS Compressor editor with source and minified output
The editor after Compress: a 1.31 KB stylesheet down to 830 B, with the stats bar along the bottom.

Getting started

  1. Install CSS Compressor and click the toolbar icon.
  2. A dedicated editor tab opens (there is no popup).
  3. Paste CSS into the source panel and click Compress.
  4. Copy or Download the minified output, or toggle beautify to inspect formatting.

Editor layout

The editor is split into source and output areas with a control bar between them:

  • Source CSS textarea with an optional beautify checkbox.
  • Compressed Output read-only textarea, also beautifyable for review.
  • Actions: Compress, Copy, Download, Clear All.
  • Stats row: original size, compressed size, savings percentage, and process time in milliseconds.
  • Header icons: theme toggle and a link to this guide.

Compression

Compression uses CSSO, a well-known CSS minifier built into the extension. CSSO is forgiving: it closes missing braces and silently drops declarations it cannot read, so check the output if a rule seems to be missing. An error message appears in the output panel only when the input cannot be parsed at all. Download saves whatever is in the output panel as minified.css.

Before and after

This source CSS:

/* Buttons */
.button {
  color: #ffffff;
  background-color: #21b68e;
  margin: 0px 0px 0px 0px;
}

.button:hover {
  background-color: #1ca37f;
}

compresses to one line, with the comment, spaces and zero units removed and the colours shortened:

.button{color:#fff;background-color:#21b68e;margin:0}.button:hover{background-color:#1ca37f}

Beautify toggles

Each beautify checkbox snapshots the current raw text, then shows a formatted view (2-space indent via js-beautify). Unchecking restores the snapshot. If you type while beautify is on, the toggle turns off automatically so you do not lose edits.

CSS Compressor dark theme with the Beautify toggle on
Beautify ticked on the source panel turns a one-line stylesheet into readable rules. Untick it to restore the original text.

Theme

Dark and light themes are available from the moon/sun toggle. Your choice is remembered. Until you pick one, the editor follows the light or dark setting of your computer.

Features

  • CSSO minification: One-click compress with size and time stats.
  • Beautify toggles: Independently format input or output with js-beautify.
  • Compression stats: Original size, compressed size, savings %, and milliseconds.
  • Copy and download: Export minified CSS to clipboard or .css file.
  • Theme support: Dark/light toggle with system preference fallback.
  • Toolbar launcher: Opens the full-page editor in a new tab.

Privacy

Your CSS never leaves the extension tab. No network requests are made during compress or beautify.

See the Apps & Extensions Policy and Privacy Policy for company-wide details.

Troubleshooting

A rule disappeared after compressing

CSSO drops declarations it cannot read, such as a missing colon or an unknown value, without a warning. Find that rule in your source, fix the typo, and compress again.

I see an error instead of output

The input could not be parsed at all. Look for an unclosed comment (/* without */) or a stray brace near the end.

The editor is slow with a big stylesheet

Very large files (several megabytes) take longer on slower computers. Turn off both beautify boxes while compressing.

Still stuck? Open a support ticket with the page address and what you expected to happen.