HTMLMinifier

JSON →
library 4.2.0 ·javascript
verified Jun 4, 2026

HTMLMinifier is a highly configurable, well-tested JavaScript-based HTML minifier for Node.js (version 4.2.0). It compresses HTML by removing unnecessary whitespace, comments, and redundant attributes, with options for custom attribute removal. Compared to alternatives like htmlcompressor and minimize, it consistently achieves superior size reduction (e.g., 42 KB vs 46 KB on Google homepage). The package supports CLI and programmatic usage, and is actively maintained with regular releases.