htmlcompressor
com.github.hazendaz
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.
Add to your project1.13.1
<dependency>
<groupId>com.github.hazendaz</groupId>
<artifactId>htmlcompressor</artifactId>
<version>1.13.1</version>
</dependency>Version Details — 1.13.1
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.