Skip to content
OneKitly

CSS minifier

Shrink CSS by removing comments and unnecessary whitespace.

Open CSS minifier and you get an answer straight away, with no account to create. Its place is under JSON, XML & formats; JavaScript Minifier / Beautifier and JSON formatter, minifier and validator answer the questions closest to this one.

How to use it

  1. Open the tool — no signup or install needed.
  2. Enter your input or adjust the available options.
  3. Get your result instantly, then copy or download it.

Frequently asked questions

What does CSS minifier do?

Shrink CSS by removing comments and unnecessary whitespace.

When would I actually use this?

Making a machine-generated blob readable, finding the character where a parse fails, and shrinking a file before it ships.

What is the most common mistake?

Assuming valid means correct. A document can parse cleanly and still have the wrong shape for whatever will read it — validation checks the syntax, not the schema.

How is CSS minifier different from JavaScript Minifier / Beautifier?

They sit next to each other but answer different questions. JavaScript Minifier / Beautifier: minify or beautify JavaScript in your browser, with a tokenizer that respects strings, regex and comments. Pick whichever matches what you're starting from — both are free.

Is there a tool for the next step?

JSON formatter, minifier and validator is the closest one after this: Format, beautify or minify JSON — with instant validation.

Where do the figures come from?

Parsing and serialisation follow each format's specification. Key order and whitespace are not semantically meaningful in JSON or YAML, so a reformatted document is equivalent even when the bytes differ.

Further reading

All guides →
GuideBeautify or Minify: What Each Is For, and What It Does to the WeightFour real stylesheets run through the minifier, measured raw and after gzip. Stripping every space saved 48, 103, 104 and 147 compressed bytes; stripping comments saved 57, 1 358, 2 420 and 1 042. Plus the five inputs this minifier breaks.GuideWhat a Minifier Can Remove, and What It Must NotMinification has to preserve meaning, and the interesting part is the whitespace that carries meaning: the descendant combinator, the spaces inside calc(), the gap between two inline elements. Measured here on real files, including how much brotli was going to save you anyway.GuideTransposing a Table Whose Rows Should Have Been ColumnsWhat happens to the header row, what happens to rows of unequal length, what happens to types — and the one thing transposing is regularly mistaken for and cannot do.ExplainerXML to JSON: Attributes, Repetition, and the Single-Element Array TrapTwo documents that differ only in how many children exist produce two different JSON shapes, and no converter can tell them apart without a schema. Plus what this one really does with attributes, mixed content and whitespace — and the one thing it still cannot record.ExplainerCSV to JSON: The Five Cases That Break Every ConverterQuoted delimiters, embedded newlines, ambiguous types, duplicate headers and encoding. Each one was run through the converter and the exact output is printed here — including the two cases it does not rescue.ComparisonJSON vs XML: What's the Difference?JSON and XML both store structured data as text, but they trade off differently. Here's how each looks, where each wins, and how to choose.