Skip to content
Tooletto

CSS Minifier

A preset of CSS Formatter

Compress a stylesheet to the smallest valid output by stripping comments and unnecessary whitespace. Safe by design — no rules are merged and no values rewritten, so behaviour cannot change.

  • Files never leave your device
  • Free, no signup
  • No watermarks
  • Works offline once loaded
Loading tool…

How to css formatter

  1. 1

    Paste your CSS

    Plain CSS, SCSS or Less all parse correctly.

  2. 2

    Format or minify

    Beautify for readability, or compress for production.

  3. 3

    Copy or download

    The result is ready to paste straight back into your project.

Why "safe" minification is the right trade for hand-written CSS

A build pipeline running a dedicated CSS optimiser can safely apply more aggressive transformations than this tool does, because it runs the same optimiser consistently on every build and any behavioural difference gets caught by the project's own testing before it ships. Pasting a stylesheet into a one-off online tool is a different situation: there is no build step re-verifying the output, so a transformation that merges rules or reorders declarations in a way that happens to break one particular page would ship silently. Restricting this tool to whitespace and comment removal — changes that provably cannot alter which declaration wins in the cascade — means the output can be trusted without re-testing the page it came from.

Minifying a stylesheet you are about to paste somewhere size-constrained

A common case for reaching for this specifically, rather than a build tool, is a one-off need to fit a small stylesheet into a size-constrained field — an inline `<style>` block kept deliberately small, a CSS snippet embedded in an email template, or a style value pasted into a platform with a character limit. For a single file needed once, running an entire build pipeline is overkill; pasting it here and copying the minified result back out is the faster path to the same result.

Frequently asked questions

How much does minifying actually save?

Typically 20–30% before gzip on hand-written CSS, and much less on output that a build tool already processed. Over the network the gzip or brotli layer does most of the work anyway — minification mostly helps by removing comments and redundant whitespace before that.

Does minifying change how my styles behave?

No. Only whitespace and comments are removed; selectors, properties and values are untouched. This tool does not merge rules, reorder declarations or shorten colours, because those transformations can change behaviour in ways that are hard to spot.

Does it support SCSS and Less?

Yes, both are parsed with their own grammars, so nesting, variables and mixins survive formatting. Note it formats them — it does not compile them to CSS.

Why is my CSS rejected?

Usually an unclosed brace or a stray character. The error message includes the line number so you can find it. Templating syntax mixed into the stylesheet will also fail, since it is not valid CSS.