Input
Output
Before : 1KB
,
After : 0.5KB
,
Saving : 50%
Related Tools
CSS beautify tools and minify tools online provide one click CSS beautification function and one click CSS minimization compression function.
- Open : Open the local CSS file, and the supported file encoding is UTF-8.
- Beautify : Beautify / Format the input CSS style.
- Minify : Compress the input CSS style.
- Download : Download the output CSS style locally. The file name is style.css. The file encoding is UTF-8.
-
CSS Minify Features :
- remove comments and unnecessary whitespace (but keep /*! ... */ which usually contains the license).
- remove trailing semicolons.
- optimize margin, padding and border-width number of sides.
- shorten numbers by removing unnecessary + and zeros and rewriting with/without exponent.
- remove dimension and percentage for zero values.
- remove quotes for font families and make lowercase.
- rewrite hex colors to/from color names, or to three digit hex.
- rewrite rgb(, rgba(, hsl( and hsla( colors to hex or name.
- use four digit hex for alpha values (transparent → #0000).
- replace normal and bold by numbers for font-weight and font.
- replace none → 0 for border, background and outline.
- lowercase all identifiers except classes, IDs and URLs to enhance gzip compression.
- shorten MS alpha function.
- rewrite data URIs with base64 or ASCII whichever is shorter.
- calls minifier for data URI mediatypes, thus you can compress embedded SVG files if you have that minifier attached.
- shorten aggregate declarations such as background and font.