CSS Minifier & Beautifier

Shrink CSS for production, or re-indent it for reading — both in one tool.

Runs in your browserNo sign-up required
Minified
Before293 B
After208 B
Saved85 B (29%)

Minifying removes comments, spaces and the last semicolon in each rule, and drops empty rules — without changing what your CSS does. Spaces that matter, like the one in .menu :hover, and everything inside strings, url(),calc() and custom properties are left alone. Runs in your browser; nothing is uploaded.

Shrink It or Read It — Your Choice

Minifying CSS for production and untangling a minified or inconsistently formatted stylesheet for reading are opposite needs that usually mean two different tools. This one handles both — minify with comments stripped and whitespace collapsed (safely, without touching quoted string content), or beautify to re-indent based on actual brace nesting when you need to actually read through it.

How to Use This Tool

  1. 1Choose Minify or BeautifyMinify for production output, Beautify to re-indent compressed or messy CSS.
  2. 2Paste your CSSThe output updates instantly on the right as you type or paste.
  3. 3Check the size comparisonMinify mode shows exactly how much smaller the output is, in bytes and percentage.
  4. 4Copy or download the resultGrab the output directly, or save it as a .css file.

What Minifying Actually Changes

  1. 1Removes commentsCSS comments (/* ... */) are useful while writing styles but serve no purpose once shipped — they're stripped entirely.
  2. 2Collapses whitespace safelyExtra spaces, tabs, and line breaks around braces, colons, semicolons, and commas are removed without touching whitespace inside quoted strings, so content like `content: " — "` stays exactly as written.
  3. 3Drops the last semicolon before a closing braceThe final semicolon in a rule block is optional in CSS — removing it saves a byte per rule without changing anything about how the styles apply.

Frequently Asked Questions

Does minifying CSS change how my page looks?

No — minifying only removes comments and whitespace that has no visual effect. Every selector, property, and value stays exactly the same, so the rendered page is pixel-identical.

Is it safe to minify CSS with quoted content, like `content: " — ";`?

Yes — this tool specifically protects the contents of quoted strings before collapsing whitespace elsewhere, so spacing inside a string value is never touched.

What does the Beautify mode do?

It re-indents CSS based on brace nesting and puts each declaration on its own line, turning minified or inconsistently formatted CSS back into something readable — useful when inspecting a minified stylesheet from another site or tool.

How much smaller does minifying actually make a CSS file?

It depends on how much whitespace and how many comments the original has. A heavily-commented, generously-indented stylesheet can shrink noticeably; an already-compact one will shrink very little. The exact percentage for your file is shown after minifying.

Is my CSS uploaded to a server?

No — minification and beautification both happen locally in your browser using JavaScript string processing. Nothing you paste here is ever sent anywhere.

Is this CSS minifier free to use?

Yes, completely free, with no sign-up and no size limit beyond what your browser can comfortably handle.