Developer ToolsCSS ToolsFree Tool
CSS Minifier
A developer-tools-side CSS minifier — strips comments, collapses whitespace, and trims spacing around punctuation, part of ToolHive's CSS/SCSS/LESS toolset alongside the beautifier and preprocessor converters.
How to Use CSS Minifier
- 1Paste your CSS code
- 2Click Process
- 3Copy the minified output
Frequently Asked Questions
/* comments */, all extra whitespace (collapsed to single spaces or removed), and spacing immediately around {, }, ;, :, ,, >, ~, and +.
No — it only removes whitespace and comments; it doesn't do advanced optimizations like merging duplicate rules, shortening color values, or removing unused selectors.
Functionally yes — Minifier compresses, Beautifier expands. They're separate tools with separate (inverse) regex logic, both living here in Developer Tools.
A separate (near-identical) implementation with the same purpose — this one sits alongside ToolHive's other developer-focused CSS tools (beautifier, SCSS/LESS converters), while the [Text Utilities version](/tool/css-minifier) sits alongside general-purpose text formatters. Either works the same way.
No — minification happens entirely in your browser.
Related Tools
CSS Beautifier
Reformat minified or messy CSS with a newline after each rule, selector, and declaration — the same logic as the CSS Prettifier tool.
CSS to SASS
Get a lightly restructured starting point for SCSS conversion — not a real CSS-to-SCSS transpiler with nesting or variable extraction.
SASS to CSS
Get a basic structural cleanup of SASS/SCSS — not a real Sass compiler. Variables and nesting are not resolved.
CSS to Less
Get a lightly restructured starting point for LESS conversion — not a real CSS-to-LESS transpiler with nesting or variable extraction.