CSS Minifier
Minify, format and check CSS code instantly in your browser. A parser-based engine removes comments and unnecessary whitespace safely, preserves /*! license banners, custom properties, calc() and vendor fallbacks, and reports size savings. Private, no uploads.
Options
Indentation affects Format CSS. Remove Comments and Preserve /*! comments affect Minify CSS. Strings, URLs, data URIs, custom properties and calc() are never altered.
Your CSS is processed locally in your browser and is never uploaded. Minification is safe and conservative: fallback declarations and vendor-prefixed properties are preserved. The tool never applies your CSS to this page and never downloads url() or @import resources.
How it works
- 1Paste your CSS. Paste any stylesheet — custom properties, calc(), @media, @supports, @keyframes, @font-face or modern nested CSS — into the input. Up to 2,000,000 characters are supported.
- 2Minify, format or check. Click Minify CSS (or press Ctrl+Enter) to shrink the stylesheet, Format CSS to beautify it with 2-space, 4-space or tab indentation, or Check CSS for a parser-based syntax check that reports issues with line and column.
- 3Review the savings. Check the statistics — original and output characters and UTF-8 byte sizes, characters and bytes saved, and the reduction percentage — after every minify or format run.
- 4Copy or download. Copy the minified output, download it as styles.min.css (or styles.css after formatting), or move the result back into the input for another pass — all locally in your browser.
Best practices
- Keep your original stylesheet — minified CSS is hard to edit by hand, so the readable version is your source of truth.
- Enable Preserve /*! comments for files that ship with open-source licenses or copyright notices, then always double-check the banner survives in the output.
- Minification here is conservative: fallback declarations and vendor-prefixed properties are preserved so layout behavior never changes — always re-test the minified file in a real browser.
- The tool minifies text only — it never downloads @import or url() resources, and it never applies your CSS to the page you are viewing.
- Everything runs locally in your browser — nothing is uploaded.
Frequently Asked Questions
What does the CSS Minifier do?
Can it beautify CSS?
Does it remove comments?
Does it support CSS variables and calc()?
Does it support @media, @supports and @keyframes?
Does it download @import or url() resources?
Is CSS minification risky?
Can the CSS Minifier validate my stylesheet?
Is my CSS uploaded to a server?
Related Tools
Format and beautify HTML code.
Format, validate, and beautify JSON data.
Test and debug regular expressions in real time.
Encode and decode Base64 strings instantly.
Encode and decode URL strings and parameters.
Minify JavaScript code for production.
Supported CSS
Minify any modern CSS directly in your browser: selectors (including attribute, pseudo-class, pseudo-element, custom elements and escaped selectors), strings, quoted and unquoted URLs, data URIs and base64 SVGs, custom properties, var() with fallbacks, calc()/min()/max()/clamp(), and at-rules such as @media, @supports, @keyframes (with vendor prefixes), @font-face, @import, @property, @container, @layer, @scope and @starting-style. Modern nested CSS (&:hover) is preserved with a nesting-aware engine. Unicode text (Tamil, Hindi, Arabic, CJK and emoji) is preserved exactly. Up to 2,000,000 characters per input. Everything runs locally — no uploads.
Privacy & data removal
Your CSS is minified, formatted and checked entirely in your browser and is never uploaded to any server. No account is required to use the CSS Minifier, we never store or share your stylesheets, and the tool makes no network requests — @import and url() resources are never fetched.
