CSS Minifier
Minify CSS for production by stripping whitespace, comments, and redundant rules. Paste your stylesheet and get the compressed output ready to ship or inline.
How to use the css minifier
Paste CSS into the input box and press Minify to strip comments and whitespace.
Formula & explanation
Strips comments, collapses whitespace, removes unnecessary spaces around punctuation, and drops trailing semicolons before closing braces.
Examples
A 500 byte stylesheet often shrinks to 350–400 bytes (~25% smaller).
Frequently asked questions
- Is this lossless?
- Yes — it only removes whitespace and comments. CSS rules and values are preserved exactly.
Related developer tools tools
- JS MinifierMinify JavaScript using Terser — removes whitespace, shortens variable names, and removes dead code. Paste your JS and get a production-ready compressed bundle.
- XML FormatterFormat, indent, and validate XML documents. Detects malformed tags, unclosed elements, and bad attributes with clear line-level error messages. Great for config and API work.
- SQL FormatterPretty-print and format SQL for any major dialect — MySQL, PostgreSQL, SQLite, T-SQL, and more. Normalizes indentation, keywords, and spacing for readable, consistent queries.
- Base64 Encoder/DecoderEncode text or binary data to Base64 and decode Base64 strings back to text. Supports standard and URL-safe Base64. Useful for data URIs, API tokens, and email attachments.
- Image to Base64Convert any image file into a Base64 data URI for embedding directly in CSS or HTML. Supports PNG, JPG, GIF, WebP, and SVG. No upload — processed entirely in your browser.
- HTML EditorWrite HTML with live preview side-by-side. Syntax-highlighted editor with formatted source view — useful for testing snippets, email templates, or quick mockups in your browser.