Skip to content
FileConvertify
Tools

CSS Minifier

Reduce CSS source size and download a compact stylesheet. Processing happens in your browser without uploading your code.

  • Free, no sign-up
  • Text stays in your browser
  • Paste code / no upload

Up to 500,000 character units. Input is not saved. Processing stays in this browser; pasted code is not executed.

Step by step

How to minify a CSS stylesheet

  1. Step 1: Paste a plain CSS stylesheet, or load the example to see a small card rule. Include CSS only, without HTML style tags or a surrounding document.

  2. Step 2: Select Minify CSS. The tool parses the stylesheet, removes unnecessary whitespace and applies CSS-aware value optimizations while keeping rule restructuring disabled.

  3. Step 3: Review the result and size difference, then copy it or download a CSS file. Keep the original source so future edits remain easy to read and maintain.

What changes during CSS minification?

Whitespace between selectors and declarations can often be shortened. Some color and zero values also have shorter equivalent forms. The sample card rule shows how a readable stylesheet can become a compact output without manually removing spaces inside strings or expressions.

This tool uses CSSO with structural rule optimization disabled. It does not intentionally merge or reorder separate rules. Comments beginning with an exclamation mark are retained for important notices; ordinary comments may be removed. Keep any legally required attribution in an important comment and inspect the result before publishing.

Use compiled CSS rather than preprocessor source

Paste a complete CSS stylesheet. Sass, SCSS, Less, Tailwind directives requiring compilation and HTML style elements are not supported as source languages. Compile those with your project's normal build system first. A minifier reduces an existing stylesheet; it does not generate utilities, resolve imports or bundle referenced assets.

CSS parsing detects many structural mistakes, but successful minification is not proof of browser compatibility. Unknown properties, vendor extensions and newer syntax may be preserved or rejected depending on parser support. Check the output in the browsers your project supports and compare the rendered page with the original stylesheet.

Read the size comparison correctly

The input and output counts measure UTF-8 bytes before HTTP compression. They are not download-speed estimates. A very short or already minified stylesheet may show little reduction; the tool reports the actual difference rather than promising a particular percentage. Images, fonts and imported files are outside these byte totals.

Processing runs locally in a browser worker with a 500,000 UTF-16-unit input limit and a timeout. Keep a source copy before pasting very large stylesheets because the editor can truncate oversized input. Relative URLs are kept as source text, so place the output where those paths still resolve. No stylesheet is applied to this page.

Frequently asked questions

Will this combine several CSS files?
No. It minifies the stylesheet you paste. It does not fetch imports or rewrite relative asset paths, so preserve your project's file locations.
Are license comments kept?
Comments beginning with /*! are retained. Ordinary comments can be removed. Review required attribution in the output before distributing it.
Can I paste SCSS or Less?
Use compiled CSS instead. This tool does not run Sass, Less, PostCSS plugins or a Tailwind build.
Does minification guarantee a smaller download?
No. The tool reports source byte differences. Actual transfer size also depends on HTTP compression and caching, and already compact input may change very little.