CSS Minifier

Compresses a CSS string/file with no possible side-effect.

  • Removes useless white spaces, indentation characters and line breaks
  • Strips all comments
  • Removes the last semi-colon of a style declaration and extra semi-colons
  • Removes empty CSS declarations
  • Removes units when using zero values
  • Removes the leading 0 if a float value is lower than one
  • Chances RGB color values to a shorter hexadecimal format
  • Hexadecimal colors following the pattern #AABBCC are reduced to #ABC
  • Keeps a single charset per CSS file removing all extra declarations
  • None values are converted to 0 whenever safe to do so