HtmlCompressor is a small, fast and very easy to use Java library that minifies given HTML or XML source by removing extra whitespaces, comments and other unneeded characters without breaking the content structure. As a result pages become smaller in size and load faster. A command-line version of the compressor is also available. You can check out HTML compressor in action and experiment with different compression settings live on the HTML Compiler site made by Erich Reich. Here is a few samples of HTML compression results with default settings: | Site Name | Original | Compressed | Decrease | |:--------------|:-------------|:---------------|:-------------| |BBC |77,054b |55,324b | 28.2% | |CNet |86,492b |61,896b | 28.4% | |FOX News |75,266b |64,221b | 14.7% | |GameTrailers |112,199b |92,851b | 17.2% | |Kotaku |134,938b |116,280b | 13.8% | |National Post |75,006b |55,628b | 25.8% | |SlashDot |158,137b |142,346b | 10.0% | |StackOverflow |116,032b |100,478b | 13.4% | Table of Contents How it Works During HTML compression the following is applied to the page source: * Any content within
,