loot.tools

CSS Minifier / Beautifier

Paste CSS and minify it by stripping comments and collapsing whitespace, or beautify it with clean indentation. See the size savings instantly, all in your browser.
0 chars
0 chars

What minification does

Minifying strips out everything a browser ignores: comments, indentation, line breaks, and the spaces around braces, colons, and semicolons. The stylesheet still renders identically but downloads as a single dense block. Production sites ship minified CSS to cut page weight, and this tool shows you exactly how many bytes you save.

Safe by design

The minifier reads your CSS character by character so it never touches anything inside quotes - selectors like [data-x="a b"], url() paths, and content strings stay exactly as written. Spaces that actually matter, like the ones in calc(100% - 10px) or margin: 0 auto, are kept. It won't rewrite your values or merge rules, so the output behaves the same as the input.

Beautify to read it again

Switch to Beautify when you need to read or edit minified CSS. It rebuilds the stylesheet with one rule per line and consistent 2 or 4 space indentation, so a compressed bundle pulled from a CDN becomes legible. Useful for debugging production styles or studying how a framework wrote its CSS.