CSS Minifier

Strip CSS down to a compact single line — with size savings shown and one-click beautify.

CSS464 B
CSS · 464 B · runs locally

What this tool does

Paste CSS — stylesheets, component styles, critical CSS for inlining — and hit Minify to strip comments, whitespace, and redundant semicolons in place, with the percentage saved shown in the status bar. Beautify goes the other way, re-indenting the document with Prettier when you need to read it. Media queries, keyframes, and vendor prefixes all pass through intact. Everything runs in your browser.

How to use it

  1. Paste your CSS into the editor — or hit Upload to open a .css, .scss, or .less file from your machine.
  2. Click Minify to strip comments and whitespace in place — the status bar shows the size and the percentage saved.
  3. Click Beautify whenever you need the document readable again — it re-indents in place with Prettier.
  4. Copy the result, or Download it — the file follows the active mode: .min.css after Minify, .css otherwise.

Frequently asked questions

Is my CSS uploaded anywhere?
No. Minification and beautification run entirely in your browser. Nothing is sent to a server, logged, or stored.
How much smaller does minified CSS get?
It depends on how the input is written — a typical hand-formatted stylesheet shrinks by 20–40% once comments, indentation, and redundant semicolons are gone. The status bar shows the exact size and the percentage saved.
Does minifying change how the styles behave?
No. The minifier only removes comments, collapses whitespace, and drops semicolons before closing braces — selectors, properties, and values are untouched, so the browser applies exactly the same styles.
Can I get readable CSS back after minifying?
Yes — hit Beautify and the document is re-indented in place with Prettier, the same formatter the CSS Formatter tool uses. Comments that were already stripped by Minify are gone for good, though, so beautify a copy if you need them.
Does it handle media queries, keyframes, and vendor prefixes?
Yes. At-rules like @media and @keyframes are minified along with everything else, and vendor-prefixed properties such as -webkit-flex pass through unchanged.