CSS Minifier

Shrink CSS by removing comments and spaces.

Also called: CSS compressor, minify CSS.

FreeNo sign-upRuns in your browser
DEVELOPER

CSS Minifier

Shrink CSS by removing comments and spaces.

Runs locally in your browser
Ready. Fill in the fields above, then press Run tool.
Privacy note: this tool runs in your browser, so the text you enter stays on your device.

Find a tool

Loading tools…

Watch: how to use the CSS Minifier (12 seconds)

Recorded on a phone, steps written on screen, no sound.

About the CSS Minifier

Shrink CSS by removing comments, spaces and line breaks so pages load a little faster. Keep the readable original for editing.

How to use the CSS Minifier

  1. Enter your textType or paste CSS.
  2. Press Run toolThe result appears right under the button.
  3. Copy or download the resultCopy text results with Copy output; when the tool makes a picture or file, use its Download button.

This tool works inside your browser: what you enter stays on your device.

Example

A sample input and the result the CSS Minifier gives for it (produced by the tool itself, not typed by hand).

CSS
/* header */ .site-header { color: #1a1a1a; margin: 0 auto; padding: 12px 16px; } .site-header a:hover { color: #0057b8; }

Result:

.site-header{color:#1a1a1a;margin:0 auto;padding:12px 16px}.site-header a:hover{color:#0057b8}

— 131 → 94 characters

Good to know

What you need
You type or choose: CSS
Where it runs
In your browser, on your device.
Cost
Free, no sign-up.

Questions

Can it break my CSS?

It only removes what browsers ignore; test the result.

Can I undo it?

Use the CSS Beautifier to make it readable again.

More tools in Developer

See all Developer tools