T-50 · Developer tools

CSS Minifier and Beautifier

Minify CSS to cut file size, or beautify it with one declaration per line. Strings, url() values and calc() spacing are kept safe. Shows % saved.

  • Runs in your browser
  • Nothing uploaded
  • No account
Instrument T-50 · CSS MinifierLocal
Mode
361 B
Size before
270 B
Size after
25.2%
Saved

About this instrument

What it does

Paste a stylesheet to minify it for production or beautify it for reading. Minifying removes comments and unnecessary whitespace and the last semicolon in each block; beautifying puts one declaration per line with the indent you choose and indents rules nested in @media and similar blocks. The size before and after and the percentage saved are shown as you type.

How to use it

  1. Paste your CSS.
  2. Choose Minify or Beautify (and an indent).
  3. Copy or download the result.

FAQ

Common questions.

01How much smaller will my CSS get?

It depends on how much whitespace and how many comments the file has. Hand-written, commented CSS often shrinks by 20 to 40%; already-compact CSS barely changes.

02Is it safe to remove the last semicolon in a block?

Yes. In CSS the semicolon separates declarations, so the one before the closing brace is optional.

03Does it handle modern CSS?

Custom properties, nesting, @media, @supports, @container and @layer blocks are tokenised like any other CSS. It does not check that your CSS is valid.