CSS Minifier
Minifies CSS and shows the size saving, raw and gzipped.
Turn minified or messy CSS back into readable code, with one declaration per line and consistent indentation inside rules and media queries.
.css file.@media, @supports, and @layer, and native CSS nesting, add another level of indentation.url() values are copied unchanged, so data URIs and quoted content survive.Input:
.btn{color:#fff;background:#1f5fbf}@media (max-width:600px){.btn{width:100%}}Formatted with 2 spaces:
.btn {
color: #fff;
background: #1f5fbf
}
@media (max-width:600px) {
.btn {
width: 100%
}
}
Usually yes. Their syntax is close enough to CSS that nesting, variables, and comments format well. Complex mixins may need a small manual touch-up.
Use the CSS Minifier, which removes comments and whitespace to reduce file size.
No. Only whitespace and line breaks change. Selectors, values, and their order stay the same.
No. Formatting runs in your browser.
Often used together with the CSS Formatter.
Minifies CSS and shows the size saving, raw and gzipped.
Beautifies HTML with consistent indentation, including inline CSS and JavaScript.
Pixels to rem, em, and pt for CSS.