Minify CSS to cut file size, or beautify a compressed stylesheet into readable rules. Comments and extra whitespace are removed when minifying, strings are preserved, and the shorter output behaves identically. Everything runs in your browser.
Input CSS
/* Card */
.card{display:flex;gap:12px;padding:16px 20px;border-radius:12px;background:#fff}
.card:hover{box-shadow:0 4px 12px rgba(0,0,0,.15)}
@media (max-width:640px){.card{padding:12px}}Beautified
/* Card */
.card {
display: flex;
gap: 12px;
padding: 16px 20px;
border-radius: 12px;
background: #fff
}
.card:hover {
box-shadow: 0 4px 12px rgba(0, 0, 0, .15)
}
@media (max-width:640px) {
.card {
padding: 12px
}
}Same input
/* Card */
.card{display:flex;gap:12px;padding:16px 20px;border-radius:12px;background:#fff}
.card:hover{box-shadow:0 4px 12px rgba(0,0,0,.15)}
@media (max-width:640px){.card{padding:12px}}Minified
.card{display:flex;gap:12px;padding:16px 20px;border-radius:12px;background:#fff}.card:hover{box-shadow:0 4px 12px rgba(0,0,0,.15)}@media (max-width:640px){.card{padding:12px}}Minify JavaScript and HTML the same way, convert colors with the color converter, or embed small images with Image to Base64.
Paste your stylesheet and choose Minify. Comments, extra whitespace and the last semicolon in each rule are removed, and strings are preserved, so the CSS behaves identically but is smaller.
Choose Beautify to expand a minified stylesheet into readable, consistently indented rules. You can pick 2 spaces, 4 spaces or tabs.
Minification only removes characters that have no effect on rendering. Keep your original source file and serve the minified copy. Everything runs in your browser — your code is never uploaded to a server.