CSS Beautifier / Minifier
Turn compressed CSS into readable lines, or prepare a deployment copy with selectable comment, whitespace and safe reduction settings.
Keep a readable source and a compact release copy
What is CSS? It is the stylesheet language that controls colour, type, spacing and layout in a web page. Browsers can read one-line code, but a developer usually finds indented rules easier to review and debug.
A CSS Beautifier restores line breaks and your choice of two spaces, four spaces or tabs. To beautify CSS online, paste the compressed source, choose whether selectors and comments should stay together, then copy or download the result. The CSS formatter changes presentation, not missing or invalid rules.
Minification should preserve meaning
The CSS Minify tab removes only the reductions you select. A CSS Minifier may collapse whitespace, drop ordinary comments, shorten colour values and clear empty qualified rules. Licence comments beginning with /*!, quoted text and URLs remain intact.
Property sorting keeps repeated declarations in their original order, which matters for fallbacks. Unit removal also skips custom properties and values inside functions such as calc(). Even with those safeguards, test animations, browser prefixes and nested at-rules in the project that will ship them.
Processing stays in this browser. Keep the readable file as your source and use the downloaded .min.css file as the delivery copy.
Frequently Asked Questions About the CSS Beautifier / Minifier
No. The tool changes layout and applies selected reductions; it does not validate a missing brace, an invalid selector or a bad value. Test the result in a development build.
A dimensional zero can affect value typing inside custom properties or functions such as calc(). The tool leaves those areas intact and removes length units only from safer declaration values.
Couldn't find the answer you were looking for?
Explore all our tools and get the fastest answer to your question.