PHPackages                             html2text/html2text - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. html2text/html2text

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

html2text/html2text
===================

Converts HTML to formatted plain text

4.3.2(1y ago)59134.0M—4.2%176[15 issues](https://github.com/mtibben/html2text/issues)[4 PRs](https://github.com/mtibben/html2text/pulls)20GPL-2.0-or-laterPHPCI failing

Since Dec 26Pushed 1y ago22 watchersCompare

[ Source](https://github.com/mtibben/html2text)[ Packagist](https://packagist.org/packages/html2text/html2text)[ RSS](/packages/html2text-html2text/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (1)Versions (17)Used By (20)

Html2Text
=========

[](#html2text)

A PHP library for converting HTML to formatted plain text.

[![Build status](https://github.com/mtibben/html2text/actions/workflows/ci.yml/badge.svg)](https://github.com/mtibben/html2text/actions/workflows/ci.yml)

Installing
----------

[](#installing)

```
composer require html2text/html2text

```

Basic Usage
-----------

[](#basic-usage)

```
$html = new \Html2Text\Html2Text('Hello, &quot;world&quot;');

echo $html->getText();  // Hello, "WORLD"
```

History
-------

[](#history)

This library started life on the blog of Jon Abernathy

A number of projects picked up the library and started using it - among those was RoundCube mail. They made a number of updates to it over time to suit their webmail client.

Now it has been extracted as a standalone library. Hopefully it can be of use to others.

###  Health Score

59

—

FairBetter than 99% of packages

Maintenance33

Infrequent updates — may be unmaintained

Popularity73

Solid adoption and visibility

Community50

Growing community involvement

Maturity71

Established project with proven stability

 Bus Factor1

Top contributor holds 60.1% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~278 days

Recently: every ~550 days

Total

15

Last Release

637d ago

Major Versions

1.0.1 → 2.0.02014-10-18

2.0.1 → 3.0.02015-10-11

3.1.0 → 4.0.02016-02-22

### Community

Maintainers

![](https://www.gravatar.com/avatar/61d94165c13417941a32d14d4468f27868c7643e96495090cfd33009055ea48c?d=identicon)[mtibben](/maintainers/mtibben)

![](https://www.gravatar.com/avatar/78a96747f18e52b416f46e619e6732a38aa2520583848110898707569edc0fee?d=identicon)[wolfwolker](/maintainers/wolfwolker)

---

Top Contributors

[![mtibben](https://avatars.githubusercontent.com/u/980499?v=4)](https://github.com/mtibben "mtibben (83 commits)")[![andrewnicols](https://avatars.githubusercontent.com/u/370047?v=4)](https://github.com/andrewnicols "andrewnicols (20 commits)")[![pascalbaljet](https://avatars.githubusercontent.com/u/8403149?v=4)](https://github.com/pascalbaljet "pascalbaljet (4 commits)")[![iansltx](https://avatars.githubusercontent.com/u/472804?v=4)](https://github.com/iansltx "iansltx (4 commits)")[![cameorn1730](https://avatars.githubusercontent.com/u/46586436?v=4)](https://github.com/cameorn1730 "cameorn1730 (3 commits)")[![pstast](https://avatars.githubusercontent.com/u/5357442?v=4)](https://github.com/pstast "pstast (2 commits)")[![jimjag](https://avatars.githubusercontent.com/u/84076?v=4)](https://github.com/jimjag "jimjag (2 commits)")[![kasperg](https://avatars.githubusercontent.com/u/73966?v=4)](https://github.com/kasperg "kasperg (2 commits)")[![mario-kinesissurvey-com](https://avatars.githubusercontent.com/u/8127237?v=4)](https://github.com/mario-kinesissurvey-com "mario-kinesissurvey-com (1 commits)")[![Nyholm](https://avatars.githubusercontent.com/u/1275206?v=4)](https://github.com/Nyholm "Nyholm (1 commits)")[![on2](https://avatars.githubusercontent.com/u/7304119?v=4)](https://github.com/on2 "on2 (1 commits)")[![orlitzky](https://avatars.githubusercontent.com/u/1432135?v=4)](https://github.com/orlitzky "orlitzky (1 commits)")[![scaytrase](https://avatars.githubusercontent.com/u/6578413?v=4)](https://github.com/scaytrase "scaytrase (1 commits)")[![sgrodzicki](https://avatars.githubusercontent.com/u/712836?v=4)](https://github.com/sgrodzicki "sgrodzicki (1 commits)")[![Sylry](https://avatars.githubusercontent.com/u/9798412?v=4)](https://github.com/Sylry "Sylry (1 commits)")[![Synchro](https://avatars.githubusercontent.com/u/81561?v=4)](https://github.com/Synchro "Synchro (1 commits)")[![vargaandrea](https://avatars.githubusercontent.com/u/1370800?v=4)](https://github.com/vargaandrea "vargaandrea (1 commits)")[![AdeAttwood](https://avatars.githubusercontent.com/u/14832454?v=4)](https://github.com/AdeAttwood "AdeAttwood (1 commits)")[![wolfwolker](https://avatars.githubusercontent.com/u/1926137?v=4)](https://github.com/wolfwolker "wolfwolker (1 commits)")[![ajouve](https://avatars.githubusercontent.com/u/2337492?v=4)](https://github.com/ajouve "ajouve (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/html2text-html2text/health.svg)

```
[![Health](https://phpackages.com/badges/html2text-html2text/health.svg)](https://phpackages.com/packages/html2text-html2text)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
