PHPackages                             wikimedia/remex-html - 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. [Parsing &amp; Serialization](/categories/parsing)
4. /
5. wikimedia/remex-html

ActiveLibrary[Parsing &amp; Serialization](/categories/parsing)

wikimedia/remex-html
====================

Fast HTML 5 parser

6.0.1(1mo ago)12741.8k—1.1%15MITHTMLPHP &gt;=8.1

Since Feb 24Pushed 1mo ago14 watchersCompare

[ Source](https://github.com/wikimedia/mediawiki-libs-RemexHtml)[ Packagist](https://packagist.org/packages/wikimedia/remex-html)[ Docs](https://www.mediawiki.org/wiki/RemexHtml)[ RSS](/packages/wikimedia-remex-html/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependencies (22)Versions (29)Used By (5)

RemexHtml
=========

[](#remexhtml)

RemexHtml is a parser for HTML 5, written in PHP.

RemexHtml aims to be:

- Modular and flexible.
- Fast, as opposed to elegant. For example, we sometimes use direct member access instead of going through accessors, and manually inline some performance-sensitive code.
- Robust, aiming for O(N) worst-case performance.

RemexHtml contains the following modules:

- A compliant preprocessor and tokenizer. This generates a token event stream.
- Compliant tree construction, including error recovery. This generates a tree mutation event stream.
- A fast integrated HTML serializer, compliant with the HTML fragment serialization algorithm.
- DOMDocument construction.

RemexHtml presently lacks:

- Encoding support. The input is expected to be valid UTF-8.
- Scripting.
- Precise compliance with specified parse error generation.

RemexHtml aims to be compliant with W3C recommendation HTML 5.1, except for minor backported bugfixes. We chose to implement the W3C standard rather than the latest WHATWG draft because our application needs stability more than feature completeness.

RemexHtml passes all [html5lib tests](https://github.com/html5lib/html5lib-tests), except for parse error counts and tests which reference a future version of the standard.

**WARNING** This is a new project, we are still developing use cases. So the API is subject to change.

For example code, see `bin/test.php`.

###  Health Score

65

—

FairBetter than 99% of packages

Maintenance89

Actively maintained with recent releases

Popularity44

Moderate usage in the ecosystem

Community33

Small or concentrated contributor base

Maturity82

Battle-tested with a long release history

 Bus Factor2

2 contributors hold 50%+ of commits

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 ~124 days

Recently: every ~94 days

Total

28

Last Release

58d ago

Major Versions

1.0.3 → 2.0.02018-08-14

2.3.2 → 3.0.02021-10-24

3.0.3 → 4.0.02023-02-24

4.1.2 → 5.0.02025-06-04

5.1.0 → 6.0.02026-02-13

PHP version history (5 changes)1.0.3PHP &gt;=5.5.9

2.0.0PHP &gt;=5.6.99

2.2.0PHP &gt;=7.2.9

4.0.0PHP &gt;=7.4

5.1.0PHP &gt;=8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/b94d9718c06ec7c3fd7a104bc44966fb7464b9ec7411582343ea35a7a6a85f08?d=identicon)[mediawiki](/maintainers/mediawiki)

![](https://www.gravatar.com/avatar/716c86d71cbf921e7912a505f89d799de398fc0a3af0bd4c8862834b2d642bd7?d=identicon)[wikimedia](/maintainers/wikimedia)

![](https://www.gravatar.com/avatar/3551c2aefb299a0c45807f7677f5b26d8a5be4a4af359b4bf4fabbdd1f2b990e?d=identicon)[cscott](/maintainers/cscott)

---

Top Contributors

[![cscott](https://avatars.githubusercontent.com/u/156080?v=4)](https://github.com/cscott "cscott (80 commits)")[![tstarling](https://avatars.githubusercontent.com/u/389141?v=4)](https://github.com/tstarling "tstarling (68 commits)")[![umherirrender](https://avatars.githubusercontent.com/u/1174884?v=4)](https://github.com/umherirrender "umherirrender (44 commits)")[![jdforrester](https://avatars.githubusercontent.com/u/881572?v=4)](https://github.com/jdforrester "jdforrester (15 commits)")[![legoktm](https://avatars.githubusercontent.com/u/81392?v=4)](https://github.com/legoktm "legoktm (13 commits)")[![reedy](https://avatars.githubusercontent.com/u/67615?v=4)](https://github.com/reedy "reedy (7 commits)")[![thiemowmde](https://avatars.githubusercontent.com/u/6576639?v=4)](https://github.com/thiemowmde "thiemowmde (3 commits)")[![Krinkle](https://avatars.githubusercontent.com/u/156867?v=4)](https://github.com/Krinkle "Krinkle (3 commits)")[![subbuss](https://avatars.githubusercontent.com/u/91608?v=4)](https://github.com/subbuss "subbuss (3 commits)")[![tgr](https://avatars.githubusercontent.com/u/145412?v=4)](https://github.com/tgr "tgr (2 commits)")[![arlolra](https://avatars.githubusercontent.com/u/123708?v=4)](https://github.com/arlolra "arlolra (2 commits)")[![xSavitar](https://avatars.githubusercontent.com/u/4872561?v=4)](https://github.com/xSavitar "xSavitar (1 commits)")[![ayg](https://avatars.githubusercontent.com/u/940446?v=4)](https://github.com/ayg "ayg (1 commits)")[![Daimona](https://avatars.githubusercontent.com/u/38216014?v=4)](https://github.com/Daimona "Daimona (1 commits)")[![MaxSem](https://avatars.githubusercontent.com/u/1260606?v=4)](https://github.com/MaxSem "MaxSem (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/wikimedia-remex-html/health.svg)

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

###  Alternatives

[wikimedia/parsoid

Parsoid, a bidirectional parser between wikitext and HTML5

187557.3k3](/packages/wikimedia-parsoid)[laravel/framework

The Laravel Framework.

34.8k543.8M20.1k](/packages/laravel-framework)[civicrm/civicrm-core

Open source constituent relationship management for non-profits, NGOs and advocacy organizations.

751291.4k43](/packages/civicrm-civicrm-core)[shopware/platform

The Shopware e-commerce core

3.4k1.5M3](/packages/shopware-platform)[perplorm/perpl

Perpl is an improved and still maintained fork of Propel2, an open-source Object-Relational Mapping (ORM) for PHP.

2411.8k](/packages/perplorm-perpl)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

585.6M574](/packages/shopware-core)

PHPackages © 2026

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