CSS Minifier

Reduce CSS size by minifying stylesheets locally in your browser and reviewing the size savings.

CSS input

Paste stylesheets, media queries, keyframes, variables, and modern CSS functions.

Processed locally in your browser Limit Browser memory. Your input is processed in your browser and is not uploaded or sent to a server. Avoid pasting production secrets, access tokens, private keys, passwords, or sensitive customer data unless you understand the risk.

CSS is never injected. Minification parses source text only and does not fetch URLs, imports, fonts, images, or external resources.

Minified CSS

Compact output with syntax feedback and byte savings.

Ready to minify CSS

Paste CSS or load a sample, then minify to check syntax and review size savings.

Media queries, keyframes, variables, vendor prefixes, pseudo-selectors, and modern functions are supported as source text.

CSS Minification Guide

Compact CSS locally without applying styles

Minify complete stylesheets and snippets as inert source text, then compare the original and minified byte counts before using the result.

What is CSS minification?

CSS minification removes unnecessary comments, whitespace, and optional punctuation so stylesheets become smaller while preserving selectors and declarations.

CSS Minifier vs Formatter

A formatter expands CSS for reading and review. A minifier compacts CSS after the stylesheet is ready to ship or embed.

How size savings are calculated

The summary compares browser byte counts for the original CSS and minified output, then reports saved bytes and percentage reduction.

Safe minification

Safe mode avoids cascade-changing rewrites such as property sorting, selector merging, unit conversion, color rewriting, or dropping fallback declarations.

Comments and licenses

Ordinary comments are removed by default. Keep special comment preservation on when license banners or important build notices must stay in the output.

Modern CSS support

Media queries, keyframes, custom properties, vendor prefixes, pseudo-selectors, and functions such as calc(), var(), and clamp() are handled as CSS text.

CSS Minifier FAQ

Does this CSS Minifier apply my styles to the app?

No. The tool treats CSS as text, validates syntax, minifies the string, and never injects style tags or applies selectors to DevCoreTools.

Will @import or url() fetch external resources?

No. URLs, imports, fonts, and image references stay as text. The browser does not request external resources while minifying.

Why keep safe minification on?

Safe minification removes low-risk formatting overhead without changing cascade order, merging selectors, sorting declarations, or rewriting values that could affect behavior.

How are special comments preserved?

Comments that look like license or preservation banners are kept when Preserve special comments is enabled. Ordinary comments are still removed when Remove comments is on.

Why did minification fail?

Broken braces, unfinished comments, invalid declarations, or malformed strings can stop parsing until the CSS syntax is corrected.

Does this tool upload my CSS?

No. Minification, syntax checks, copying, and downloads run locally in your browser.