How to use
- Choose CSS or JavaScript.
- Enter your code.
- Click "Minify" to see the result with comments/whitespace removed and the size reduction shown.
🎯 Use Cases
- Reduce CSS/JS file size before deployment
- Minify inline styles for email templates, etc.
- Minimize size when sharing code
Example
Input
.button {
color: #ffffff; /* text color */
background: #3366ff;
padding: 10px 20px;
}Output
.button{color:#ffffff;background:#3366ff;padding:10px 20px}In CSS mode the tool strips comments and all unnecessary whitespace and line breaks, drops the trailing semicolon, and collapses everything onto one line. This example shrinks from 93 to 59 bytes, about 37% smaller.
FAQ
- Are variable names mangled too?
- No. For safety, only comments and unnecessary whitespace are removed — variable names are left unchanged. For actual production deployments, we recommend using a dedicated bundler.
- Do CSS and JS minify differently?
- CSS is fully compressed onto a single line, while JS keeps line breaks for syntactic safety and only removes whitespace and comments.
- Is the code I enter sent to a server?
- No. It's processed entirely in your browser.
More Coding Tools
📘
JSON Formatter
Prettify, validate & minify JSON
🗓️
Timestamp Converter
Convert Unix timestamp ↔ date
🧩
JSON String Encoder
Convert text ↔ JSON string literal
✨
JS/CSS Formatter
Indent & tidy JS/CSS code
🧽
HTML Formatter
Indent HTML by tag structure
🧹
XML Formatter
Indent XML by tag structure
🗃️
SQL Formatter
Break SQL into clauses & indent
🔣
HTML Entity Encoder
Convert special chars ↔ HTML entities
📊
Excel to HTML Table
Convert spreadsheet data to HTML TABLE
⛓️
Link Extractor
Extract href/src links from HTML
🎨
Color Picker
Get HEX, RGB & HSL color codes
🐘
PHP Syntax Checker
Check bracket/string pairing (practical checker)
🗄️
MySQL Syntax Checker
Check bracket/quote pairing (practical checker)
🔍
HTML5 Validator
Check tag pairing, duplicate id, missing alt
✍️
Online HTML Editor
Write & edit HTML visually