Home Tools About Us ♥ Support Us
🎨 CSS Minifier

Minify, beautify &
validate CSS

Smaller stylesheets, readable formatting, and a live class preview sandbox — all instant, right in your browser.

1. Options

2. Your CSS

Input CSS
0 bytes
Output
// Output will appear here
0 bytes

4. Class Preview Sandbox

Applies the class name(s) below — using the CSS from the editor above — to sample text, an image, and an SVG icon, so you can see the effect before shipping it.

5. Extractors & Calculators

Colors Used

Font Families

Media Queries

CSS Custom Properties

🕘 Local History

Saved only on this device — never uploaded anywhere.

No history yet.

How to use every option

  1. Add your CSS — paste it, upload a .css file, drag one onto the input box, or click Sample.
  2. Choose an indentation style — 2 spaces, 4 spaces, or a tab — used whenever you beautify.
  3. Set a file name for the download button; ".min.css" or ".css" is appended automatically based on the action you run.
  4. "No nested indentation" keeps beautified output on separate lines but skips extra indent levels for nested at-rules like @media.
  5. "Keep comments" preserves /* ... */ blocks in the minified output — useful for license headers.
  6. "Sort properties" alphabetizes declarations inside each rule when beautifying, for easier diffing.
  7. "Shorten hex colors" turns 6-digit hex codes into 3-digit shorthand where possible (e.g. #aabbcc#abc).
  8. "Optimize zero values" strips units from zero (0px0) since they have no effect at zero.
  9. "Remove duplicate declarations" drops repeated properties within the same rule, keeping the last (winning) value.
  10. "Remove empty rules" deletes selectors with no declarations left after cleanup.
  11. Validate checks for unclosed braces, comments, and strings, and reports the approximate line.
  12. Beautify / Minify generate formatted or compact CSS in the Output pane — copy it or download it as a file.
  13. Search the output using the search box above the Output pane; matches are highlighted and counted.
  14. Class Preview Sandbox — type one or more class names, optionally add custom text or an image, then click Refresh Preview to see your classes applied live to text, an image, and an SVG icon.
  15. Extractors pull out every color, font-family, media query, and custom property (CSS variable) used in your stylesheet, ready to copy.
  16. Specificity calculator — type any selector to see its inline/ID/class/type specificity breakdown.
  17. px ⇄ rem converter — enter a value in either field (with your base font size) to convert instantly both ways.
  18. Every validate/beautify/minify run is saved to Local History — click an entry to reload it.

Built to replace a dozen scattered CSS tools

Minify
Strip whitespace, comments, and redundant syntax for a smaller file.
Beautify
Readable formatting with custom indentation and optional flattened nesting.
Validate
Catches unclosed braces, comments, and strings with an approximate line number.
🎨
Color Shortening
Shrinks 6-digit hex to 3-digit shorthand wherever it's valid.
0️⃣
Zero-Unit Optimization
Removes redundant units on zero values.
🖼️
Class Preview Sandbox
See your classes applied to text, images, and SVGs before you ship them.
🔍
Extractors
Pull every color, font, media query, and custom property from your stylesheet.
🧮
Specificity Calculator
See the inline/ID/class/type breakdown for any selector.
📐
px ⇄ rem Converter
Convert between pixels and rem using a custom base font size.
🔒
100% Private
Everything runs locally in your browser — nothing is uploaded.

Frequently Asked Questions

No. Minification only removes characters browsers don't need — whitespace, comments, and redundant syntax. The visual result stays identical.

No. Parsing, validation, minifying, beautifying, and the preview sandbox all run locally in your browser. Nothing is sent to or stored on our servers.

Minifying permanently strips unneeded characters from the source before deployment. Compression (like Gzip or Brotli) shrinks the file temporarily in transit. Production sites typically use both together.

Yes. Toggle "Keep comments when minifying" before you click Minify if you need to preserve license headers or notes.

It keeps each rule readable on its own lines but skips the extra indent levels nested at-rules (like @media) would normally add — handy for diffs and some linters.

It renders your CSS inside an isolated preview frame and applies the class name(s) you type to sample text, an image, and an SVG icon — or your own uploaded image and custom text — so you see the effect instantly.

You can, but it isn't recommended. Keep a readable source file for development and generate a fresh minified file for production each time.

Not directly, but faster-loading pages improve performance metrics that can indirectly support SEO.

Related tools

Browse Other Categories

Support EaseDev Studios

All tools are free. If they've saved you time, consider supporting us.

Buy Us a Coffee

A quick one-time gesture that means a lot.

Buy a Coffee →
🎗️

Become a Patron

Support us monthly and help build more tools.

Join on Patreon →