# string-strip-html

> Strip HTML tags from strings. No parser, accepts mixed sources.

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

## Install

```sh
npm install string-strip-html
pnpm add string-strip-html
yarn add string-strip-html
bun add string-strip-html
```

## 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 | 13.7.3 |
| Published | 2026-09-09 |
| First published | 2017-11-27 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM |
| Node | >=18.20.8 |
| Dependencies | 5 |
| Unpacked size | 169.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 213 |
| Author | Roy Revelt |
| Maintainers | royston |
| Keywords | code, extract, from, html, jsp, mixed, remove, separate, stri, string, strip, tags, templating, text, xhtml |

## Links

- npm: https://www.npmjs.com/package/string-strip-html
- Repository: https://github.com/codsen/codsen
- Homepage: https://codsen.com/os/string-strip-html
- Issues: https://github.com/codsen/codsen/issues
- npm.io page: https://npm.io/package/string-strip-html

## Dependencies (5)

- [ranges-push](https://npm.io/package/ranges-push.md) ^7.3.2
- [codsen-utils](https://npm.io/package/codsen-utils.md) ^1.10.2
- [ranges-apply](https://npm.io/package/ranges-apply.md) ^7.2.5
- [html-entity-codec](https://npm.io/package/html-entity-codec.md) ^1.1.0
- [string-left-right](https://npm.io/package/string-left-right.md) ^6.2.4

## 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

- 13.7.3 (latest) — 2026-09-09
- 13.7.2 — 2026-09-07
- 13.7.1 — 2026-09-06
- 13.7.0 — 2026-09-01
- 13.6.2 — 2026-08-24
- 13.6.1 — 2026-08-19
- 13.6.0 — 2026-08-19
- 13.5.3 — 2026-01-15
- 13.5.0 — 2025-10-15
- 13.4.24 — 2025-10-12
- 13.4.23 — 2025-10-08
- 13.4.22 — 2025-10-07
- 13.4.13 — 2025-07-21
- 13.4.12 — 2025-03-02
- 13.4.8 — 2024-04-04
- … 224 more at https://npm.io/package/string-strip-html/versions

## README

<h1 align="center">string-strip-html</h1>

<p align="center">Strip HTML tags from strings. No parser, accepts mixed sources.</p>

<p align="center">
  <a href="https://codsen.com/os/string-strip-html" rel="nofollow noreferrer noopener">
    <img src="https://img.shields.io/badge/-codsen-blue?style=flat-square" alt="page on codsen.com">
  </a>
  <a href="https://www.npmjs.com/package/string-strip-html" rel="nofollow noreferrer noopener">
    <img src="https://img.shields.io/badge/-npm-blue?style=flat-square" alt="page on npm">
  </a>
  <a href="https://github.com/codsen/codsen/tree/main/packages/string-strip-html" rel="nofollow noreferrer noopener">
    <img src="https://img.shields.io/badge/-github-blue?style=flat-square" alt="page on github">
  </a>
  <a href="https://npmcharts.com/compare/string-strip-html?interval=30" rel="nofollow noreferrer noopener" target="_blank">
    <img src="https://img.shields.io/npm/dm/string-strip-html.svg?style=flat-square" alt="Downloads per month">
  </a>
  <a href="https://codsen.com/os/string-strip-html/changelog" rel="nofollow noreferrer noopener">
    <img src="https://img.shields.io/badge/changelog-here-brightgreen?style=flat-square" alt="changelog">
  </a>
  <img src="https://img.shields.io/badge/licence-MIT-brightgreen.svg?style=flat-square" alt="MIT Licence">
  <a href="https://codsen.com/os/string-strip-html/play"><img src="https://img.shields.io/badge/playground-here-brightgreen?style=flat-square" alt="playground"></a>
</p>

**No 3rd party dependencies.** All dependencies and devDependencies, checked recursively, are Codsen packages.

## Install

This package is [pure ESM](https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c). If you're not ready yet, install an older version of this program, 8.5.0 (`npm i string-strip-html@8.5.0`).

```bash
npm i string-strip-html
```

## Quick Take

```js
import { strict as assert } from "node:assert";

import { stripHtml } from "string-strip-html";

assert.equal(
  stripHtml("Some text <b>and</b> text.").result,
  "Some text and text.",
);
```


## Documentation

Please [visit codsen.com](https://codsen.com/os/string-strip-html/) for a full description of the API. For **Changelog**, see [raw md on GitHub](https://github.com/codsen/codsen/blob/main/packages/string-strip-html/CHANGELOG.md) or [the website](https://codsen.com/os/string-strip-html/changelog). Also, try the [GUI playground](https://codsen.com/os/string-strip-html/play).

## Contributing

To report bugs or request features or assistance, [raise an issue](https://github.com/codsen/codsen/issues/new/choose) on GitHub.

## Licence

MIT License

Copyright © 2010-2026 Roy Revelt and other contributors

<p align="center"><img src="https://codsen.com/images/png-codsen-ok.png" width="98" alt="ok" align="center"> <img src="https://codsen.com/images/png-codsen-1.png" width="148" alt="codsen" align="center"> <img src="https://codsen.com/images/png-codsen-star-small.png" width="32" alt="star" align="center"></p>

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