100% local processing — your files and data never leave this browser. No uploads, no server storage.

OnboxTools

Free · Browser-only · No upload

Minify CSS online

Compress stylesheets for faster page loads

Minify css in your browser — strip comments, collapse whitespace, and shorten values to produce smaller stylesheets ready for production. Built for developers who need a fast css minifier without uploading theme files to a remote server.

Css minification runs entirely client-side with live size stats. Use our CSS Unminifier when you need readable formatting again.

CSS Unminifier
Input CSS
Minified CSS
Original

0 B

Output

0 B

Change

More Text Utilities

🔓
Base64 Decoder
🧬
Base64 Encoder
🔡
Case Converter
Cron Generator
🎨
CSS Minifier
📐
CSS Unminifier
📆
Date Format Converter
📅
Date to Unix
🔎
Find and Replace
🛡️
HTML Escape
📰
HTML Minifier
↩️
HTML to Markdown
🔓
HTML Unescape
📄
HTML Unminifier
📋
Markdown Preview
🔄
Markdown to HTML
🎲
Random Number
🔤
Random String
🔍
Regex Tester
🧹
Remove All Whitespace
↩️
Reverse Text
✂️
Split String
⚖️
Text Compare
🔁
Text Repeater
📖
Text Viewer
🌍
Time Zone Converter
🕐
Unix Time to Date
🔗
URL Encoder
🔤
UTF-8 Decoder
🌐
UTF-8 Encoder
📊
Word Counter

Browse by category

Complete guide to CSS minification online

What CSS minification does

Css minification removes characters that browsers ignore but humans rely on — block comments, extra spaces, and redundant semicolons — so the stylesheet shrinks without changing how rules apply. The result is minified css that parses the same way in every modern browser.

When you minify css online here, you get a one-line or compact output ideal for CDN uploads, critical CSS inlining, and email-safe snippets. This is source-level minification, not HTTP gzip; pair both for the smallest transfer size.

A css minifier does not rename class names or purge unused selectors unless you add advanced tooling like cssnano with custom plugins. This page focuses on safe, predictable minification of css that preserves cascade order and @media boundaries.

Comment-heavy design-system files often drop twenty to fifty percent in bytes. Already-compact files save less, but every kilobyte matters on mobile networks and Core Web Vitals budgets.

How to minify CSS with this tool

Paste your stylesheet into the input panel or import a .css file. Minified output updates automatically as you edit — no separate run button. Toggle options for comments, whitespace, hex shortening, and zero-value compression to match your risk tolerance.

The stats row below the panels shows original bytes, output bytes, and percentage saved so you can report minification of css before a deploy. Copy or download the result as minified.css when satisfied.

Load the sample stylesheet to see typical savings on a small site theme. Compare output against your bundler when debugging discrepancies — charset and string quoting should match if inputs are identical.

For ad-hoc edits, minify a chunk, paste into your CMS or embed tag, and ship. For full projects, still run PostCSS or cssnano in CI; this css minifier online fills gaps between releases.

Minification css options explained

Remove comments strips /* ... */ blocks including license headers. Keep a separate LICENSE file in your repo if legal text must travel with the project.

Collapse whitespace merges runs of spaces and trims around braces, colons, and semicolons. This is the core of minification css passes and rarely breaks layouts when strings are protected.

Shorten hex colors converts #aabbcc to #abc where the spec allows. Disable if downstream tools match exact color strings outside the browser.

Shorten zero values normalizes 0px and similar to 0. Some legacy email clients care about units — turn this off for HTML-email CSS even when minifying for the web.

Css compression vs minify

People search compress css and minify css interchangeably. Technically, minification shrinks the source file on disk; gzip and Brotli compress bytes during HTTP transfer. Do both: minifier css output first, then let your CDN compress again.

Css compression at the transport layer cannot recover comments removed at source. Keep readable sources in version control and ship minified css to users.

Inlining critical css in HTML still benefits from minify passes — fewer bytes in the first document response. External link tags should point at minified bundles with cache-friendly filenames.

Source maps let DevTools map minified css back to authoring files without serving pretty CSS to everyone. Generate maps in your build; this page does not emit them.

When to use a css minifier online

Quick fixes before a hotfix deploy when CI is slow or unavailable. Paste, minify, and replace the single file on your host.

Auditing third-party theme CSS copied from a vendor zip before embedding in a product.

Teaching minification of css in workshops — students see byte counts change live without installing Node.

Preparing snippets for documentation or Stack Overflow answers where readable source is too long.

Privacy and related tools

Processing runs locally in your browser. Unreleased brand colors, internal class names, and client themes never upload to a server. Clear the textarea on shared machines when finished.

Pair with our CSS Unminifier to format production bundles for debugging. Use the HTML Minifier for markup; external stylesheets minify here while link tags stay in HTML.

Compile SCSS or Less to plain CSS before minifying — preprocessors are not supported on this page.

Detailed guide

Critical CSS for a landing page

Minify a small above-the-fold stylesheet, copy the output, and paste into a style block in head. Keep the full readable file in your repo for maintenance.

Measure LCP before and after — minify alone is a modest win compared to removing unused rules with PurgeCSS.

Matching your bundler output

Paste the same input into this tool and your PostCSS pipeline. Mismatches usually come from different comment stripping or hex shortening settings.

Use the stats panel to document byte savings in performance reports.

Common questions

CSS Minifier FAQ

What does a css minifier do?

It strips comments and redundant whitespace from stylesheets so files are smaller. Output is minified css ready for production deploys.

How do I minify css without breaking styles?

Use default options first, deploy to staging, and verify layouts. This minifier css pass keeps rule order intact.

Is this css minifier online free?

Yes. Minify as often as you need with no signup. Processing stays in your browser.

What is the difference between css compression and minify?

Minification shrinks the source file. Gzip and Brotli compress at transfer time. Use both for best performance.

Does it remove unused rules?

No. Basic minifiers keep every selector. Use PurgeCSS or similar in builds to drop unused rules.

Can I import SCSS or LESS?

Compile to CSS first, then minify the CSS output here or in your build tool.

Does the CSS Minifier send my input to a server?

Yes. Everything runs in your browser. Your input is not uploaded, logged, or stored on our servers.

Do I need an account?

No account or sign-up is required. Open the page and start using the tool immediately.