CSS Minifier

Minify CSS stylesheets by removing comments, whitespace, and redundant characters.

Front-end developers shrinking stylesheet file size for production performance.

How to use it

  1. Paste your CSS

    Copy your stylesheet and paste it into the editor.

  2. Click Minify

    Comments are removed and whitespace is collapsed into a single compact line.

  3. Copy the minified CSS

    Copy the output into your production stylesheet or build.

Why use this tool?

Stylesheets are written to be read by humans — comments grouping sections, indentation, spaces around values, one rule per line. None of that matters to a browser, but it all gets downloaded, and CSS is render-blocking: the browser will not paint the page until the stylesheet arrives. So every extra kilobyte of formatting directly delays how fast your page appears. This minifier removes comments and collapses whitespace into a single compact line, typically cutting 20–40% off a well-formatted stylesheet. Paste your CSS, click minify, and drop the result into production. It runs entirely in your browser, so your styles never leave your device, and it only touches whitespace and comments — selectors, properties, values, custom properties, and calc() are all preserved exactly, so specificity and behaviour are unchanged.

Common use cases

Faster first paint

Because CSS blocks rendering, a smaller stylesheet lets the browser paint the page sooner.

CDN deployment

Minify before uploading for smaller transfers and lower bandwidth costs.

WordPress & CMS themes

Compact theme CSS to lift PageSpeed scores without installing a plugin.

Embeds & widgets

Keep injected styles as light as possible on pages you do not control.

Quick one-offs

Minify a stylesheet without setting up a full build pipeline.

Frequently asked questions

Is my CSS sent to a server?

No — the stylesheet is minified locally by your browser and is never uploaded anywhere.

How much smaller will it get?

A well-formatted stylesheet usually drops 20–40%, and more when it carries lots of comments or deep indentation.

Are custom properties and calc() preserved?

Yes. All CSS — including variables, calc(), media queries, and modern syntax — is preserved correctly.

Does minifying change specificity or behaviour?

No. Only whitespace and comments are removed; selectors, properties, and values are untouched, so the rendered result is identical.

Should I keep the original stylesheet?

Yes. Keep editing the readable .css file and run this only as the final build step; minified CSS is impractical to hand-edit.

Does it combine multiple files?

It minifies what you paste. To bundle files, concatenate them first, then minify the combined CSS.

Can I minify HTML and JS too?

Use the HTML Minifier for markup. This tool is focused on CSS.

Is it free?

Yes — minify any number of stylesheets for free, with no account required.

Related tools