Loading Techie Utils…

CSS Minifier

Minify CSS by stripping comments, spaces and redundant characters. Free, and runs entirely in your browser — nothing you enter is uploaded or stored.

About Minifier

Minifying removes what a browser does not need: comments, redundant whitespace, and line breaks. For CSS and HTML that is most of the saving; for JavaScript it is the safe subset of what a full build-time minifier does.

The practical uses are inline assets — a critical CSS block, an email template, a snippet embedded in a landing page — where running a whole toolchain is disproportionate but the bytes still count.

Where it helps

  • One tool for CSS, HTML and JavaScript.
  • Typically removes a large share of a hand-written stylesheet's bytes.
  • Ideal for inline blocks that never pass through a bundler.
  • Runs locally, so nothing is uploaded to be processed.

Limits

  • It does not mangle names, tree-shake or dead-code eliminate the way esbuild or Terser do — expect smaller gains on JavaScript.
  • Minified code is hard to debug; keep the readable original in version control.
  • Whitespace-sensitive HTML (<pre>, and spacing between inline elements) can render differently.
  • Gzip or Brotli on the server already removes much of this redundancy, so the marginal gain is smaller than the raw numbers suggest.

Frequently asked questions

Is this a substitute for a bundler?

No. For application code use esbuild, Terser or your framework's build. This is for one-off snippets and inline assets.

Is minifying safe for JavaScript?

It removes comments and whitespace only, so behaviour is preserved. Always test the output, as you would with any build step.

Why did my HTML render differently after minifying?

Spaces between inline elements are meaningful in HTML. Removing them can close up gaps between links or spans.

Does minifying still matter with compression enabled?

Less than it used to. Gzip and Brotli handle repeated whitespace well, so treat minification as an extra few percent rather than the main event.

Related tools

More Web Development tools