Two opposite jobs
CSS gets written to be read by people and shipped to be read by browsers, and those two needs pull in opposite directions. Readable CSS has line breaks, indentation, spaces after colons and comments explaining why. A browser needs none of it. Beautify puts a stylesheet into a consistent, readable shape: useful for CSS you’ve inherited, copied from a page’s source, or received as one unbroken line. Minify does the reverse, taking out everything that exists only for humans, so the file is smaller to send.
What Beautify does
Every declaration goes on its own line, indented one level inside its block, with a single space after the colon. Selectors in a list each get a line, combinators like > and + get a space on either side, and commas in values get one space after them and none before. Nested rules and at-rules are indented one further level each, and top-level rules are separated by a blank line, which you can turn off. You choose two spaces, four spaces or a tab. Strings, url() values, comments and the values of custom properties are left exactly as they were written, so nothing inside them shifts.
What Minify removes, and leaves alone
The minifier is deliberately conservative. It takes out line breaks and indentation, comments, the spaces around commas and combinators, the space just inside parentheses, and the last semicolon before each closing brace. It does not change a single value: colours aren’t shortened, numbers aren’t rewritten, units aren’t converted, declarations aren’t merged or reordered, and no rule is dropped, even an empty one. Spaces that carry meaning survive, like the gap between 0 and auto in margin: 0 auto, the operators inside calc(), and the space before a parenthesis after and in a media query. Comments that begin with /*! are kept, since that’s the convention for licence notices.
Modern CSS is fine
A stylesheet doesn’t have to be old-fashioned to go through. Nested rules, @layer, @container, @supports, @keyframes and custom properties are all read as ordinary blocks and statements. Escaped characters in selectors, like .sm\:flex, aren’t mistaken for punctuation, attribute selectors and :nth-child() arguments are left alone, and a ; or } inside a string or a data: URL doesn’t end anything early.
When to use this, and when not to
Most projects minify CSS automatically as part of their build, and if yours does, that’s the right place for it. A quick tool earns its keep in the gaps: a CSS box in a CMS or email builder, a snippet for a code sample, a stylesheet you need to read that arrives minified, or a fast check of how much whitespace and comments are costing you. Minifying and compression work together: a server that compresses CSS will squeeze a minified file further still.
Nothing leaves your browser
There’s no server behind this formatter. The stylesheet is processed in the page as you type, so nothing you paste is sent, stored or logged anywhere.