CSS Minifier

Minifying CSS takes the beautified, well formed CSS code that you have written and removes the spacing, indentation, newlines, and comments. These elements are not required for CSS to be used successfully. It also makes the CSS more difficult to read.

The 'best practice' of many developers is to maintain a 'beautified' version, and when rolling out their project will run the styles through a minification program. They will also combine their many style files into one file.

Why use CSS Minifier?

Online CSS Minifier to minify CSS files - reduce file size and speed up your website for free. CSS Minification is the process of removing all unnecessary characters from CSS source code without changing its functionality. This reduces the amount of data that needs to be transferred to the users.

The purpose of minifcation is to increase the speed of a website. Minimisation can make a script up to 20% smaller, resulting in a faster download time. Some dev elopers will also use it to 'obfuscate' their code. This makes it difficult for the code to be read, thereby making it more difficult to reverse engineer or copy.

This minifier removes whitespace, strips comments, combines files, and optimizes/shortens a few common programming patterns. And it comes with a huge test suite.

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