CSS minifier
Shrink CSS by removing comments and unnecessary whitespace.
Related tools
All JSON, XML & formats tools →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 CSS Beautifier answer the questions closest to this one.
How to use it
- Open the tool — no signup or install needed.
- Enter your input or adjust the available options.
- 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 is the one to open when you need it to 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?
CSS Beautifier is the closest one after this: Reformat minified or messy CSS into clean, properly indented rules — or minify it back.
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.