CSS

Minify CSS

Compress CSS by stripping comments and all unnecessary whitespace.

css-minifier.tool
0 chars
Result will appear here
Nothing you paste here is ever sent to a server - processing happens locally in your browser.
Overview

What is a minify css?

This tool compresses CSS by removing comments and every unnecessary whitespace character - unlike JavaScript, CSS has no equivalent of Automatic Semicolon Insertion, so it's completely safe to collapse everything onto a single line for maximum size reduction.

Quick start

How to use this tool

  1. 1Paste your CSS, or upload a .css file.
  2. 2Click Run.
  3. 3The size reduction percentage is shown next to the output.
  4. 4Copy the result or download it as a .css file.
Where it helps

Common use cases

Shrinking a stylesheet for a size-conscious embed or widget
Reducing CSS file size when a build pipeline isn't available
Preparing inline <style> content to be as compact as possible
Quick size comparison before and after removing comments and whitespace
Good to know

Frequently asked questions

Is it safe to join all the CSS onto one line?

Yes - CSS has no line-based semantics like JavaScript's Automatic Semicolon Insertion, so removing all whitespace and newlines never changes what the stylesheet does.

Does it handle comments correctly?

Yes - /* ... */ style comments are stripped completely, including multi-line ones.

Will it break my CSS custom properties or calc() expressions?

No - whitespace is only trimmed around selectors and punctuation like braces, colons, and semicolons; the meaningful content of values, including calc() expressions and custom property names, is preserved.

Is my CSS sent anywhere?

No - everything runs locally in your browser.

quick_facts.json

{

"runs_in_browser": true,

"data_sent_to_server": false,

"signup_required": false,

"price": "free",

"category": "Converters"

}

Related tools

#FF
No signup
Color Converter

Convert colors between HEX, RGB, HSL, and CMYK — online color converter with live preview.

Open tool
No signup
Timestamp Converter

Convert Unix timestamps to and from human-readable dates.

Open tool
JSON
No signup
CSV to JSON

Convert CSV files into structured JSON, with optional type inference.

Open tool