Skip to content

Free CSS Minifier Online

Paste or upload your CSS and compress it instantly in your browser. Removes comments, collapses whitespace, and optimises selectors — no server required.

Detected language:CSS
Loading editor...
Use this editor to input your HTML, CSS, or JavaScript code. The language is automatically detected. You can minify code to reduce file size or beautify it to improve readability. Files can also be uploaded by dragging and dropping them onto this editor. Keyboard shortcuts: Ctrl+Shift+M to minify, Ctrl+Shift+B to beautify, Ctrl+S to download.

What gets minified

CSS minification targets what the browser skips: comments, whitespace between rules, and spaces around operators. The output is syntactically identical to the source — just without the padding. Smaller stylesheets mean less to download before the page can start rendering.

Handles all standard CSS: media queries, custom properties (variables), keyframe animations, and pseudo-selectors. Property values and selectors are preserved exactly. Nothing gets reordered or merged.

Your CSS stays in your browser — nothing is uploaded.

CSS Minifier FAQ

What does CSS minification remove?

CSS minification removes comments, unnecessary whitespace, newlines, and trailing semicolons. It also collapses shorthand properties and removes redundant spaces around selectors, colons, and brackets.

How much can CSS minification save?

Typical savings are 20–50% depending on how your CSS is written. Stylesheets with many comments, consistent indentation, and verbose property values see the biggest reductions.

Does CSS minification affect browser compatibility?

No. Minification only removes characters that have no effect on CSS parsing. All selectors, property values, and at-rules remain unchanged. The minified stylesheet behaves identically to the original.

Does CSS minification affect custom properties (variables)?

No. Custom property names and values are preserved exactly as written — --my-color: #ff0000 stays intact. Minification only removes whitespace and comments around declarations, not the declarations themselves.

Other minifiers