GeekThis remains completely ad-free with zero trackers for your convenience and privacy. If you would like to support the site, please consider giving a small contribution at Buy Me a Coffee.
What is Code Compression
The most common code compressors will simply remove unneeded white-space such as tabs, spaces and line breaks. Inside of CSS, you can also optimize color codes from the six character codes to the three character codes (#FF0000 to #F00). This only works color codes where the two bytes next to each other are the same. Also in CSS, the last semicolon in a section can be omitted. That’s another few easy bytes you can regain.
Below are a few resources available for code compression. Just make sure when you do compress your code, you keep the original file also. You won’t be able to easily modify the compressed code.
- CSS Compressor: A very basic and miniamlist compressor. Very easy to use but does lack some options that other compressors have.
- Minify CSS: A very featured rich compressor with options on save to file or show the output. Also can modify selectors and join them together to help compress your CSS even further.