Minify CSS to reduce file size, or beautify minified CSS for readability.
Runs in your browser
A CSS minifier compresses stylesheets by removing whitespace, comments, and redundant semicolons, reducing the file size that browsers must download before a page can render. Smaller CSS files contribute directly to faster First Contentful Paint (FCP) and better Lighthouse performance scores. Paste your CSS into the editor and the minifier collapses all whitespace to single characters, strips comments, and removes the final semicolons in declaration blocks producing a single-line output that is functionally identical to the original. The tool also supports beautification, expanding minified CSS back into readable, indented form.
Paste your stylesheet into the Input CSS panel. Select Minify mode to compress for production or Beautify mode to expand minified CSS for readability. Click the action button or simply start typing the tool processes your CSS live. The savings bar below the editor shows the original and output sizes alongside the percentage reduction. Click Copy to copy the output to your clipboard. For best results in production, also enable gzip or brotli compression on your web server to maximise the benefit of minification.
Use the CSS Minifier when you need Minify CSS without extra setup.
Example input: body { color: red; margin: 0 10px; }
Example result: body{color:red;margin:0 10px}.
The CSS Minifier uses browser or server-side parsing rules appropriate to the task. Formatters preserve valid structure while changing whitespace, encoders transform characters into another representation, and validators report whether the input follows the expected syntax.
When a standard exists, such as JSON, URL encoding, HTTP, JWT, YAML, or cron syntax, the tool follows common web-platform behavior as closely as possible.
The CSS Minifier is designed for quick practical use. Inputs are handled according to the tool type; browser-based tools keep work local, while live lookup tools may need server-side checks.