HTMLMinifier
JSON →HTMLMinifier is a highly configurable, well-tested JavaScript library for minifying HTML code. The current stable version is 3.5.1-patch1, released as a maintenance patch. It offers extensive options for compression, including removing comments, collapsing whitespace, and minifying inline CSS/JS. Unlike simpler minifiers, HTMLMinifier provides fine-grained control over every aspect of HTML compression and has been battle-tested on major websites like Google, Amazon, and Wikipedia. It supports both Node.js and CLI usage, with a large ecosystem of integrations (Grunt, Gulp, etc.). Active development has slowed, but it remains stable and widely used.
Resources
packagehtml-minifier-papandreou ↗