awesome-repositories.com
Blog
MCP
awesome-repositories.com

Discover the best open-source repositories with AI-powered search.

ExploreCurated searchesOpen-source alternativesSelf-hosted softwareBlogSitemap
ProjectMCP serverAboutHow we rankPress
LegalPrivacyTerms
© 2026 Bringes Technology SRL·VAT RO45896025·hello@awesome-repositories.com
kangax avatar

kangax/html-minifier

0
View on GitHub↗
5,045 stars·579 forks·JavaScript·MIT·20 viewskangax.github.io/html-minifier↗

Html Minifier

html-minifier is a Node.js utility designed to reduce HTML file size by optimizing markup, simplifying document structures, and compressing embedded CSS and JavaScript. It functions as an HTML markup compressor and web document optimizer that removes whitespace, comments, and redundant attributes.

The tool distinguishes itself by acting as an embedded asset optimizer, processing content within style and script tags through specialized compression engines. It simplifies the final output by removing optional tags and replacing long doctypes with shorter versions.

The project covers a range of optimization capabilities, including attribute optimization to strip unnecessary quotes and empty values, as well as output structure formatting to control line lengths. It also includes mechanisms for markup preservation to protect specific tags or content blocks from the compression process.

Features

  • HTML Whitespace Minifiers - Reduces HTML file size by stripping unnecessary whitespace, comments, and redundant attributes.
  • JavaScript and CSS Minifications - Minifies embedded JavaScript and CSS found within HTML script and style tags.
  • Embedded Asset Optimizers - Compresses CSS and JavaScript found inside style and script tags within HTML files.
  • HTML Markup Compressors - Shrinks the total size of HTML documents while preserving essential tags and structure.
  • Frontend Asset Compression - Compresses internal CSS and JavaScript assets embedded directly within the HTML to reduce page weight.
  • HTML Output Optimizers - Optimizes HTML output by stripping unnecessary quotes and removing empty attribute values.
  • Page Speed Optimizations - Optimizes web page delivery by reducing HTML file size to decrease load times and save bandwidth.
  • Web Document Optimizers - Simplifies HTML structures by removing optional tags and optimizing attribute quotes and values.
  • HTML Document Reconstruction - Rebuilds the final HTML output from processed tokens while enforcing specific quoting rules and maximum line lengths.
  • HTML AST Transformations - Implements an abstract syntax tree parser to identify and strip redundant HTML elements before regenerating the final output.
  • External Process Delegation - Delegates the compression of embedded style and script blocks to specialized external minification engines.
  • Regexp-Based Content Compression - Uses regular expressions to strip unnecessary whitespace and comments from the HTML markup.
  • HTML Formatting - Controls the final HTML document layout via configurable maximum line lengths and preferred quote characters.
  • Frontend Asset Pipelines - Integrates HTML compression into the frontend asset pipeline for production deployment.
  • HTML Attribute Filtering - Filters and modifies HTML attributes based on user-defined configuration flags to shrink the output.
  • HTML Structure Simplification - Shrinks the final output by removing optional tags and replacing long doctypes with shorter versions.
  • Asset Optimization - Configurable JavaScript-based HTML minification.
  • Build and Transpilation Tools - Highly configurable HTML minifier.

Star history

Star history chart for kangax/html-minifierStar history chart for kangax/html-minifier

How this analysis was created: This summary and feature list are AI-generated from collected project material and can contain mistakes. Stars, license and language are imported from GitHub. Inclusion does not mean that we have tested or audited this project. Check the source documentation for any feature you depend on. Learn more on our About page.

AI search

Explore more awesome repositories

Describe what you need in plain English — the AI ranks thousands of curated open-source projects by relevance.

Start searching with AI

Projects sharing features with Html Minifier

These projects share indexed features with Html Minifier. Shared tags can include platform or build tooling; verify the primary use case before treating a result as a replacement.
  • apache/incubator-pagespeed-ngxA

    apache/incubator-pagespeed-ngx

    4,343View on GitHub↗

    This project is an NGINX performance module and automatic page accelerator that optimizes web pages and associated assets to reduce load times. It functions as a web asset optimizer that minifies CSS and JavaScript and compresses images to reduce total data transfer. The system operates as an HTTP cache optimizer, modifying cache headers and extending asset lifetimes to decrease the frequency of repeat downloads. It automatically applies web performance best practices to accelerate page loading and improve delivery speed. The project covers broad capability areas including frontend asset com

    C++
    View on GitHub↗4,343
  • jantimon/html-webpack-pluginjantimon avatar

    jantimon/html-webpack-plugin

    10,728View on GitHub↗

    This project is a Webpack HTML generator and template engine that creates HTML files and automatically injects compiled script and style bundles. It functions as an asset injection tool and build process minifier to automate the production of web pages. The tool differentiates itself through a customizable template system that supports dynamic variable injection, programmatic content generation, and the ability to generate multiple distinct HTML entry points for multi-page applications. It also provides a hook-based lifecycle pipeline, allowing for the modification of assets and tags before t

    JavaScripthtml-webpack-pluginwebpack
    View on GitHub↗10,728
  • gregberge/svgrG

    gregberge/svgr

    11,043View on GitHub↗

    SVGR is a tool that transforms static SVG files into reusable React components for direct rendering within user interface trees. It functions as an AST-based code transformer and build-time asset pipeline, parsing SVG XML into an abstract syntax tree to modify elements before generating JavaScript source code. The project integrates an external optimization engine to strip redundant metadata and minify attributes, ensuring vector images are flexible and easy to style. It uses recursive tree traversal to apply these transformations to all nested graphic elements and employs attribute mapping t

    TypeScript
    View on GitHub↗11,043
  • imagemin/imageminimagemin avatar

    imagemin/imagemin

    5,717View on GitHub↗

    imagemin is a Node.js image optimizer and minification tool designed to reduce the storage size of image assets. It functions as a build pipeline asset optimizer that employs both lossy and lossless compression to remove unnecessary metadata and optimize pixel data. The project uses a plugin-based architecture to extend its functionality, loading external modules that handle specific image formats and compression algorithms. This allows the tool to serve as a flexible toolkit for automating image compression within development pipelines. The system covers broad capabilities for web performan

    JavaScript
    View on GitHub↗5,717
Compare all 30 related projects→

Frequently asked questions

What does kangax/html-minifier do?

html-minifier is a Node.js utility designed to reduce HTML file size by optimizing markup, simplifying document structures, and compressing embedded CSS and JavaScript. It functions as an HTML markup compressor and web document optimizer that removes whitespace, comments, and redundant attributes.

What are the main features of kangax/html-minifier?

The main features of kangax/html-minifier are: HTML Whitespace Minifiers, JavaScript and CSS Minifications, Embedded Asset Optimizers, HTML Markup Compressors, Frontend Asset Compression, HTML Output Optimizers, Page Speed Optimizations, Web Document Optimizers.

Which projects share features with kangax/html-minifier?

Projects with overlapping indexed features include: apache/incubator-pagespeed-ngx — This project is an NGINX performance module and automatic page accelerator that optimizes web pages and associated… jantimon/html-webpack-plugin — This project is a Webpack HTML generator and template engine that creates HTML files and automatically injects… gregberge/svgr — SVGR is a tool that transforms static SVG files into reusable React components for direct rendering within user… uncss/grunt-uncss — grunt-uncss is a CSS dead code eliminator and static analysis build tool. It functions as a Grunt CSS optimization… imagemin/imagemin — imagemin is a Node.js image optimizer and minification tool designed to reduce the storage size of image assets. It… middleman/middleman — Middleman is a Ruby-based static site generator and web framework used to transform templates and assets into…