# @node-minify/html-minifier

> html-minifier plugin for @node-minify

Latest version **11.0.0** (published 2026-09-02) · MIT license · 0 weekly downloads

## Install

```sh
npm install @node-minify/html-minifier
pnpm add @node-minify/html-minifier
yarn add @node-minify/html-minifier
bun add @node-minify/html-minifier
```

## Health

**Score 75/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; has provenance; recently updated; high maintenance score; high quality score.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 11.0.0 |
| Published | 2026-09-02 |
| First published | 2018-11-16 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=22.0.0 |
| Dependencies | 2 |
| Unpacked size | 14 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 520 |
| Author | Rodolphe Stoclin |
| Maintainers | srod |
| Keywords | compressor, minify, minifier, html-minifier |

## Links

- npm: https://www.npmjs.com/package/@node-minify/html-minifier
- Repository: https://github.com/srod/node-minify
- Homepage: https://github.com/srod/node-minify/tree/main/packages/html-minifier#readme
- Issues: https://github.com/srod/node-minify/issues
- npm.io page: https://npm.io/package/@node-minify/html-minifier

## Dependencies (2)

- [@node-minify/utils](https://npm.io/package/@node-minify/utils.md) 11.0.0
- [html-minifier-next](https://npm.io/package/html-minifier-next.md) ^4.19.1

## Alternatives

- [@tsparticles/shape-image](https://npm.io/package/@tsparticles/shape-image.md) — 303.7K weekly downloads
- [@tsparticles/shape-line](https://npm.io/package/@tsparticles/shape-line.md) — 233.7K weekly downloads
- [stringify-attributes](https://npm.io/package/stringify-attributes.md) — 58.6K weekly downloads
- [mobile-drag-drop](https://npm.io/package/mobile-drag-drop.md) — 46.3K weekly downloads
- [@comunica/actor-rdf-parse-html](https://npm.io/package/@comunica/actor-rdf-parse-html.md) — 29.2K weekly downloads

## Recent versions

- 11.0.0 (latest) — 2026-09-02
- 10.0.0-next.0 (next) — 2024-11-16
- 10.5.0 — 2026-03-08
- 10.4.0 — 2026-01-22
- 10.3.0 — 2026-01-09
- 10.2.0 — 2025-12-31
- 10.1.1 — 2025-12-30
- 10.1.0 — 2025-12-28
- 10.0.2 — 2025-12-28
- 10.0.1 — 2025-12-28
- 10.0.0 — 2025-12-28
- 9.0.2 — 2025-12-22
- 9.0.1 — 2024-11-12
- 9.0.0 — 2024-11-10
- 8.0.6 — 2023-04-15
- … 22 more at https://npm.io/package/@node-minify/html-minifier/versions

## README

<p align="center"><img src="https://raw.githubusercontent.com/srod/node-minify/main/static/node-minify.svg" width="348" alt="node-minify"></p>

<p align="center">A very light minifier Node.js module.</p>

<p align="center">
  <br>
  <a href="https://npmjs.org/package/@node-minify/html-minifier"><img src="https://img.shields.io/npm/v/@node-minify/html-minifier.svg" alt="npm version"></a>
  <a href="https://npmjs.org/package/@node-minify/html-minifier"><img src="https://img.shields.io/npm/dm/@node-minify/html-minifier.svg" alt="npm downloads"></a>
  <a href="https://github.com/srod/node-minify/actions"><img alt="Build Status" src="https://img.shields.io/endpoint.svg?url=https%3A%2F%2Factions-badge.atrox.dev%2Fsrod%2Fnode-minify%2Fbadge%3Fref%3Dmain&style=flat" /></a>
  <a href="https://codecov.io/gh/srod/node-minify"><img src="https://codecov.io/gh/srod/node-minify/branch/main/graph/badge.svg" alt="code coverage"></a>
</p>

# html-minifier

`html-minifier` is a plugin for [`node-minify`](https://github.com/srod/node-minify)

It allow you to compress HTML files.

## Installation

```bash
npm install @node-minify/core @node-minify/html-minifier
```

## Usage

```js
import { minify } from '@node-minify/core';
import { htmlMinifier } from '@node-minify/html-minifier';

await minify({
  compressor: htmlMinifier,
  input: 'foo.html',
  output: 'bar.html'
});
```

## Documentation

Visit https://node-minify.2clics.net/compressors/html-minifier.html for full documentation

## License

[MIT](https://github.com/srod/node-minify/blob/main/LICENSE)

---
_Source: https://npm.io/package/@node-minify/html-minifier · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
