HTML minification?

Paulo picture Paulo · Apr 8, 2009 · Viewed 79.2k times · Source

Is there a online tool that we can input the HTML source of a page into and will minify the code?

I would do that for aspx files as it is not a good idea to make the webserver gzip them...

Answer

john picture john · Sep 7, 2009

Perhaps try HTML Compressor, here's a before and after table showing what it can do (including for Stack Overflow itself):

Sorry, markdown has no concept of tables

It features many selections for optimizing your pages up to and including script minimizing (ompressor, Google Closure Compiler, your own compressor) where it would be safe. The default option set is quite conservative, so you can start with that and experiment with enabling more aggressive options.

The project is extremely well documented and supported.