Minify your CSS

Online CSS Minifier/Compressor. Free! Provides an API. Simple Quick and Fast.

Digital Ocean

We recommend Digital Ocean for hosting your sites. Free $10 credit when you sign up.

New Language Examples Pages

CSS Minifier now has a whole new set of pages showing lots of different language examples. It's a great resource and most of the code has been contributed by our users, so thanks to everyone concerned. Every person is credited on the page/language that they sent in, so if you bump into them, please say thank you. :)

The entire list of languages we now have are:

There is also a new plugins page and a programs page.

Thanks again to everyone and of course to you all for supporting this site, it's getting more and more use every week.

Tags: site-update examples

Posted: a year ago

Updated to Bootstrap v3

Finally, I've updated the design of to the latest version of Bootstrap, v3.0.3 to be precise.

I'd been meaning to do this for a while and finally found some time. I think the site looks a bit cleaner now than before so I hope you like it.

As well as changing the Bootstrap version, I also took the opportunity to link to files on the jsdelivr site. This is both the Bootstrap css and js files but also the version of jQuery too. If you're using IE<9, then it'll also link to the same place for the html5shiv.js and respond.js, so you'll get an even better speedup. The site loads fast anyway but hopefully this will make it even faster.

Tags: site-update design

Posted: 3 years ago

Django Helper

Django Helper

Gustavo Vargas has written a Django helper (plugin?) which allows you to use both CSSMinifier and JavaScript Minifier from within your projects. Cool aye?

The GitHub repo is here and named js-css-min-django. It describes itself as "JS and CSS automated merge and minifier. Optionally can parse django template tags in css and js files.". Let's face it, anything that is automated is a win!

Thanks Gustavo!

Tags: django plugin

Posted: 3 years ago

Upgrade of clean-css to v2

Just a short note to say that clean-css has been upgraded from the v1.1.x series to the v2.x.x series.

It looks like this release is pretty big, including changing the code over to a more Object Oriented interface. For of course, this doesn't affect you so just keep doing what you're doing with the same API as before.

Other things which look nice are the changeover to a token parser so that clean-css can perform more optimisations, so it looks like they're doing amazing things. Thanks (as always) to GoalSmashers for an amazing library.

Tags: clean-css site-update

Posted: 3 years ago

Minify, Compress or Minimize CSS?

Many people search for many things when it comes to minifying CSS. I originally bought this domain since I thought was a good one. It turns out that many people search for "css minify" or "css minifier".

However, not everyone thinks like me. It turns out that people search for a number of things. Let's take a look at this table which contains the past month's worth of queries in which appeared in the top ten results, what position it appeared at and how many people clicked through.

As you can see, for some queries the CTR is quite high, but on others it's a lot lower - mainly because the user searched for "css " where is not "minify" or "minifier". e.g. "compress" where the site appears at position six, rather than one or two. There is only a CTR of 7% from that one! (Interestingly, I do okay for some typos such as "css minifer", since the CTR is 80%, though there are very few queries for it.)

I'm not going to analyse this too closely though but I'll leave the table here if you're interested.

Query Impressions Clicks CTR Avg. Position
css minify5,5003,50064%1.1
minify css6,5003,00046%2.3
css minifier3,0002,50083%1.0
minify css online60020033%2.9
css min40020050%1.8
minified css40020050%1.3
css minify online40017042%2.1
compress css1,6001107%6.6
minimize css70011016%4.1
how to minify css2009045%1.8
css minifier online2009045%2.5
min css1509060%1.5
css compressor1,300705%8.2
css minification1707041%1.9
css minified1107064%1.1
css compress900506%7.3
minifier css705071%1.1
compress css online1503523%3.4
online css minifier1503523%3.0
minificar css703550%2.3
online css compressor1503020%4.8
minimise css503060%2.6
css minifer353086%1.0
css minimize1102220%3.8
minifying css702231%2.4
css mini502244%1.3
online minify css352263%2.1
compress css files1101615%3.3
css minify tool301653%1.4
minfy css301653%2.2
css minifyer221673%1.0
css compressor online901213%4.8
deminify css701217%3.7
javascript minifier200<10-10
javascript minify200<10-10
minify online110<10-5.8
css compression110<10-8.5
js minify90<10-11
online minify90<10-5.7
online minifier70<10-6.2


Tags: seo

Posted: 3 years ago

New Examples Page

I've just added a new examples page so that I could get more in depth on how to use from various programming languages. Currently there are examples of using curl, node.js, PHP and LWP Request with more to come.

This also minimises the stuff that it at the bottom of the homepage and just focuses on the main function of the site.

I'd love to get more examples in a language of your choice so send me something and I'll put it up. Toni Almeida sent me a link to a project he wrote called PHP JS CSS Minifier which is a PHP library which uses CSS Minifier and JavaScript Minifier to automatically minimise assets. He uses it prior to releasing to production. I have also linked to this project from the examples page.

Thanks for using CSS Minfiier and send any suggestions to @andychilton (and follow me too!). I'll keep trying to update the site with more stuff as time goes on, as well as more up to date code.

Have fun and happy CSS'ing!

Tags: site-update examples

Posted: 3 years ago

Upgrade of clean-css to 1.1.x Series

Just a short note to say that clean-css has been upgraded from the v1.0.x series to the v1.1.x series.

Have fun and happy CSS'ing!

Tags: clean-css site-update css

Posted: 3 years ago

Import Statements Left Intact

Prior to today's release, any @import statements were being processed but deleted in the final minified output. This is because clean-css presumes files are being processed locally and the @import file exists on the filesystem too.

However, when minifying on the web, only one file is minified at a time, therefore any file referenced via the @import statement won't exist and the statement was replaced with nothing - it was essentially deleted.

Luckily, clean-css has a config option for processImport : false which means that @import statements are now not processed and are therefore left intact. Which is exactly what we need here.

Thanks to @Vicrry for reporting this issue.

Have fun and happy CSS'ing!

Tags: site-update css

Posted: 3 years ago

Switched from YUI Compressor to clean-css

Today I have just released a new version of which uses a different minifier in the backend.

Prior to today I was using the JavaScript version of the YUI compressor but I realised that the JavaScript version was no longer in the repository. I guess it is no longer supported. In the past, I had to update the code for this manually since it wasn't in npm and whilst it was okay, it was slightly painful.

To ease this manual procedure I decided to use something straight out of the box from npm. After installing a few different packages and trying them out, I settled on using clean-css by GoalSmashers. It's a very well written library and it has lots of tests. But the most important thing is that it's a library that is supported and frequently updated - which is great news! Thanks to the GoalSmashers team for producing such an awesome library and an important part of the npm and node.js ecosystem.

Another improvement is that clean-css also supports media queries so that's great news in today's mobile first world.

The difference between the old and new minifiers isn't much and whilst there might be a few bytes difference in the size, hopefully there won't be any major incompatibilites. clean-css tries to be faster but I didn't test it against the JS version of YUI Compressor.

Have fun and happy CSS'ing!

Tags: site-update css npm clean-css

Posted: 4 years ago

« Older Posts - Page of 1 - Newer Posts »