Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
H

html2text

> 编程语言
Open source

PHP library to convert HTML to formatted plain text

590 stars0 likes1 views
WebsiteGitHub

About

PHP library to convert HTML to formatted plain text

Html2Text

A PHP library for converting HTML to formatted plain text.

Installing

composer require html2text/html2text

Basic Usage

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

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

History

This library started life on the blog of Jon Abernathy http://www.chuggnutt.com/html2text

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.

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

PHP

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言