CSS Minifier

Minify CSS by stripping comments and whitespace — see the size saving. Free, in your browser.

Strips comments and whitespace. Runs entirely in your browser.

Free to use — premium coming soon

FREE
  • Comment & whitespace removal
  • Size saving
  • 100% private
PREMIUM
  • Remove ads
  • Advanced optimization

About the CSS Minifier

A CSS minifier rewrites your stylesheet into the smallest functionally identical form by stripping everything a browser ignores. Paste your CSS and it removes comments, line breaks, indentation, and runs of whitespace, then drops characters that are technically optional: the final semicolon before a closing brace, trailing zeros, and spaces around colons, commas, and braces. The selectors, properties, and values stay exactly as written, so the rendered page looks the same. The point is fewer bytes over the wire and slightly faster parsing, since the browser no longer scans past comments and formatting that exist only to help humans read the code.

Reach for this when you are about to ship a stylesheet to production or paste critical CSS inline into your HTML. Hand-authored CSS, exported theme files, and snippets copied from documentation are usually full of generous spacing and explanatory comments that inflate the download. Minifying is also handy when a page-speed audit flags 'minify CSS', or when you want to inline a small stylesheet without bloating the document. Keep your original, readable file in version control and treat the minified output as a build artifact you regenerate, not something you edit by hand. Never try to maintain code in its minified state.

Minification is a syntactic transform, not compression. It understands just enough CSS structure to know which characters are safe to delete, which is why it preserves your rules byte-for-byte where it matters. That makes it complementary to gzip or Brotli, which your server applies on top: gzip finds repeated strings and replaces them with back-references, doing the heavy lifting on size, while minification cleans up the redundancy gzip cannot model and trims parse time. On a real stylesheet, minifying alone trims a modest slice, gzip a much larger one, and the two together beat either by itself. Run minify at build time; let the server handle compression at serve time.

This tool runs entirely in your browser. Your CSS is processed locally in JavaScript and is never uploaded to a server, so even proprietary or unreleased styles stay on your machine. One accuracy note: a safe minifier only touches whitespace and clearly optional characters, but aggressive optimizations elsewhere can change behavior, so always test the output. Watch for cases that depend on whitespace, such as content strings in pseudo-elements (content: " ") or carefully spaced custom property values, and confirm the page still renders correctly before deploying. When in doubt, diff the rendered result, not just the file size.

Frequently asked questions

What exactly does minifying CSS remove?

It removes comments, newlines, indentation, and redundant whitespace, plus optional characters like the last semicolon before a closing brace and spaces around colons, commas, and braces. Selectors, properties, and values are preserved, so the styles behave identically.

How much smaller will my CSS file get?

Whitespace-and-comment minification typically trims roughly 10-20% on its own, though heavily commented or generously formatted files can shrink more. The bulk of real-world size savings comes from pairing minification with server gzip or Brotli compression.

If my server already uses gzip, do I still need to minify?

Yes. Minification and gzip work differently and stack: gzip handles repeated strings at the byte level, while minification removes redundancy gzip cannot model and speeds up parsing. Combining both produces a smaller download than either alone, and minify is a cheap one-time build step.

Will minifying break my CSS or change how the page looks?

Safe minification only deletes ignorable characters, so the page should render identically. The rare exceptions are values that depend on whitespace, such as content strings in pseudo-elements, so test the output before deploying.

What about source maps for debugging minified CSS?

A source map is a separate .map file that links each position in the minified CSS back to your original source, letting browser DevTools show readable code. This simple paste-and-minify tool does not generate source maps; for that, use a build tool like a bundler or PostCSS in your pipeline.

From our blog

How Open Graph Tags Turn a Plain Link Into a Click-Worthy Preview

By the Super Simple Digital Tools Team · Updated June 2026

Every time someone shares one of your links, a social platform sends a crawler to fetch the page and read a small set of meta tags. Those tags, not your visible page design, decide the headline, description, and image that appear in the preview card. The Open Graph protocol, introduced by Facebook in 2010, gave the web a shared vocabulary for this, and today Facebook, LinkedIn, Pinterest, Slack, Discord, and WhatsApp all read it. A generator helps because the syntax is unforgiving: one misspelled property name or a relative image path quietly produces a blank card.

Start with the four required properties. og:title is the headline the card shows, og:type is usually 'website' for a landing page or 'article' for a blog post, og:url is the canonical address of the page, and og:image is the picture. Add og:description for the one- or two-sentence snippet beneath the title, and og:site_name so the card is attributed to your brand. Because platforms truncate titles differently (Facebook around 100 characters, X around 70, WhatsApp as few as 40), keep titles concise so they survive on every surface.

The image deserves the most care, since it occupies the largest part of the card. Target 1200 by 630 pixels, declare og:image:width and og:image:height with those exact numbers, and add og:image:alt for accessibility. Always use an absolute https URL: the crawler does not know your domain, so a path like /og.png will fail. The 1200x630 size is the de facto standard even though the protocol itself does not mandate a dimension, and it covers X's large-image card despite X's own slightly different 1200x675 recommendation.

X (formerly Twitter) layers its own twitter: namespace on top. Set twitter:card to summary_large_image to get the big-image layout, and add twitter:site with your @handle. You generally do not need to duplicate every field: when a twitter: tag is absent, X reuses your og:title, og:description, and og:image. The pragmatic rule is to implement Open Graph completely, then add just twitter:card and twitter:site, which together cover the vast majority of platforms with minimal extra markup.

Once the tags are generated, paste them into the page's <head> and deploy. Then verify, because tags that look right in code can still fail in the wild. Platforms cache the first card they see, so changes will not appear until you re-scrape the URL in each one's official debugger. Confirm the image loads over https, the URL is canonical, and nothing depends on client-side rendering the crawler will skip. A two-minute validation pass is the difference between a polished preview and a grey box that makes your link look broken.

  • Always set og:image to a full absolute https URL; relative paths like /image.png produce blank previews because the crawler does not know your domain.
  • Export your share image at exactly 1200x630 and keep headlines and logos inside a centered safe zone so nothing gets cropped on different platforms.
  • Add twitter:card set to summary_large_image plus twitter:site, then let X fall back to your og:title, og:description, and og:image for everything else.
  • After deploying, paste the URL into each platform's official debugger to clear cached previews and confirm the image and text resolve correctly.

Read the full guide →

Tool by the Super Simple Digital Tools Team. Reviewed by our editorial team. Free to use, no signup required.

Related tools