PHPackages                             edituraedu/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. edituraedu/html2text

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

edituraedu/html2text
====================

A PHP script to convert HTML into a plain text format

v2.1.1(3mo ago)04↓90%MITPHPPHP ^8.4

Since Mar 26Pushed 3mo agoCompare

[ Source](https://github.com/TecsiAron/html2text)[ Packagist](https://packagist.org/packages/edituraedu/html2text)[ RSS](/packages/edituraedu-html2text/feed)WikiDiscussions main Synced 3w ago

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

Html2Text
=========

[](#html2text)

[![Latest Version on Packagist](https://camo.githubusercontent.com/99ba24652dd0d1fd89529b46bd60121e40289517fc569002c60fdcf16b50000d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f776f726b736f6d652f68746d6c32746578742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/worksome/html2text)[![GitHub Tests Action Status](https://camo.githubusercontent.com/8508acaf02748c47c054a2347a6f0ff7e223fd6f1b21f94904a960039a094a3a/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f776f726b736f6d652f68746d6c32746578742f74657374732e796d6c3f6272616e63683d6d61696e267374796c653d666c61742d737175617265266c6162656c3d7465737473)](https://github.com/worksome/html2text/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/419ed4b62731af4158f2b25d7f42aab31e4aa4287273c6461ce6f865db906cce/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f776f726b736f6d652f68746d6c32746578742f7374617469632e796d6c3f6272616e63683d6d61696e267374796c653d666c61742d737175617265266c6162656c3d636f64652532307374796c65)](https://github.com/worksome/html2text/actions?query=workflow%3A%22Static+Analysis%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/9b647f5a3eb2f50c6981bf5c25ed4f650bca76bebe5fd81557d7cf3bfb6938bc/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f776f726b736f6d652f68746d6c32746578742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/worksome/html2text)

A simple converter from HTML to Plaintext

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require worksome/html2text
```

Usage
-----

[](#usage)

```
$text = \Worksome\Html2Text\Html2Text::convert($html);
```

See the [original repository](https://github.com/soundasleep/html2text) for more information.

### Options

[](#options)

OptionDefaultDescription**dropLinks**`false`Set to `true` to not render links as `My Link` instead of `[https://foo.com](My Link)`.**characterSet**`'auto'`Set to a specific character set to override the auto-detection with `mb_detect_encoding`.Pass along a configuration class as a second argument to `convert`, for example:

```
$options = new \Worksome\Html2Text\Config(
    dropLinks: true
);

$text = \Worksome\Html2Text\Html2Text::convert($html, $options);
```

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [GitHub Releases](https://github.com/worksome/html2text/releases) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](.github/CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [Owen Voke](https://github.com/owenvoke)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

39

—

LowBetter than 85% of packages

Maintenance82

Actively maintained with recent releases

Popularity3

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 57.8% 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

Unknown

Total

1

Last Release

91d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/206812dc0b9d21437229038a3544110adf650818a3866ac3bd20a26dd55626a4?d=identicon)[TecsiAron](/maintainers/TecsiAron)

---

Top Contributors

[![soundasleep](https://avatars.githubusercontent.com/u/3889656?v=4)](https://github.com/soundasleep "soundasleep (85 commits)")[![owenvoke](https://avatars.githubusercontent.com/u/1899334?v=4)](https://github.com/owenvoke "owenvoke (31 commits)")[![edgrosvenor](https://avatars.githubusercontent.com/u/1053395?v=4)](https://github.com/edgrosvenor "edgrosvenor (7 commits)")[![TecsiAron](https://avatars.githubusercontent.com/u/4922350?v=4)](https://github.com/TecsiAron "TecsiAron (5 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (3 commits)")[![laravel-shift](https://avatars.githubusercontent.com/u/15991828?v=4)](https://github.com/laravel-shift "laravel-shift (2 commits)")[![vanhoavn](https://avatars.githubusercontent.com/u/3288188?v=4)](https://github.com/vanhoavn "vanhoavn (2 commits)")[![Stadly](https://avatars.githubusercontent.com/u/7263579?v=4)](https://github.com/Stadly "Stadly (1 commits)")[![thetaylor82](https://avatars.githubusercontent.com/u/2462662?v=4)](https://github.com/thetaylor82 "thetaylor82 (1 commits)")[![timothyasp](https://avatars.githubusercontent.com/u/707699?v=4)](https://github.com/timothyasp "timothyasp (1 commits)")[![tommygnr](https://avatars.githubusercontent.com/u/929392?v=4)](https://github.com/tommygnr "tommygnr (1 commits)")[![ulrichsg](https://avatars.githubusercontent.com/u/197901?v=4)](https://github.com/ulrichsg "ulrichsg (1 commits)")[![pethersonmorenosqg](https://avatars.githubusercontent.com/u/9138772?v=4)](https://github.com/pethersonmorenosqg "pethersonmorenosqg (1 commits)")[![guillaume-ro-fr](https://avatars.githubusercontent.com/u/1820051?v=4)](https://github.com/guillaume-ro-fr "guillaume-ro-fr (1 commits)")[![jaylinski](https://avatars.githubusercontent.com/u/1668766?v=4)](https://github.com/jaylinski "jaylinski (1 commits)")[![manzoorwanijk](https://avatars.githubusercontent.com/u/18226415?v=4)](https://github.com/manzoorwanijk "manzoorwanijk (1 commits)")[![maskas](https://avatars.githubusercontent.com/u/1159983?v=4)](https://github.com/maskas "maskas (1 commits)")[![cyrosy](https://avatars.githubusercontent.com/u/2836107?v=4)](https://github.com/cyrosy "cyrosy (1 commits)")[![SDKiller](https://avatars.githubusercontent.com/u/2150916?v=4)](https://github.com/SDKiller "SDKiller (1 commits)")

###  Code Quality

TestsPest

### Embed Badge

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

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

###  Alternatives

[mirazmac/dotenvwriter

A PHP library to write values to .env (DotEnv) files

21142.7k11](/packages/mirazmac-dotenvwriter)[timoetting/kirby-color

Kirby-Color is a color picker plugin for Kirby CMS v3.

4618.2k](/packages/timoetting-kirby-color)

PHPackages © 2026

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