PHPackages                             pangutech/htmlpurifier - 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. [Validation &amp; Sanitization](/categories/validation)
4. /
5. pangutech/htmlpurifier

ActiveLibrary[Validation &amp; Sanitization](/categories/validation)

pangutech/htmlpurifier
======================

Standards compliant HTML filter written in PHP

v4.7.0(10y ago)014LGPLPHPPHP &gt;=5.2

Since Feb 18Pushed 9y ago1 watchersCompare

[ Source](https://github.com/PanGuTech/htmlpurifier)[ Packagist](https://packagist.org/packages/pangutech/htmlpurifier)[ Docs](http://htmlpurifier.org/)[ RSS](/packages/pangutech-htmlpurifier/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependenciesVersions (4)Used By (0)

HTML Purifier
=============

[](#html-purifier)

HTML Purifier is an HTML filtering solution that uses a unique combination of robust whitelists and agressive parsing to ensure that not only are XSS attacks thwarted, but the resulting HTML is standards compliant.

HTML Purifier is oriented towards richly formatted documents from untrusted sources that require CSS and a full tag-set. This library can be configured to accept a more restrictive set of tags, but it won't be as efficient as more bare-bones parsers. It will, however, do the job right, which may be more important.

Places to go:

- See INSTALL for a quick installation guide
- See docs/ for developer-oriented documentation, code examples and an in-depth installation guide.
- See WYSIWYG for information on editors like TinyMCE and FCKeditor

HTML Purifier can be found on the web at:

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

[](#installation)

Package available on [Composer](https://packagist.org/packages/ezyang/htmlpurifier).

If you're using Composer to manage dependencies, you can use

```
$ composer require "ezyang/htmlpurifier": "dev-master"

```

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community19

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 87% 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 ~449 days

Total

3

Last Release

3936d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/8deab9c7d7d629abe23c535eab8670fedd8cdcd585bb25635a270cb8a6f3a916?d=identicon)[tougudashi](/maintainers/tougudashi)

---

Top Contributors

[![ezyang](https://avatars.githubusercontent.com/u/13564?v=4)](https://github.com/ezyang "ezyang (187 commits)")[![PanGuTech](https://avatars.githubusercontent.com/u/19404581?v=4)](https://github.com/PanGuTech "PanGuTech (4 commits)")[![Synchro](https://avatars.githubusercontent.com/u/81561?v=4)](https://github.com/Synchro "Synchro (4 commits)")[![dgm](https://avatars.githubusercontent.com/u/52503?v=4)](https://github.com/dgm "dgm (1 commits)")[![hamrak](https://avatars.githubusercontent.com/u/5807028?v=4)](https://github.com/hamrak "hamrak (1 commits)")[![jdufresne](https://avatars.githubusercontent.com/u/347634?v=4)](https://github.com/jdufresne "jdufresne (1 commits)")[![mtibben](https://avatars.githubusercontent.com/u/980499?v=4)](https://github.com/mtibben "mtibben (1 commits)")[![nalysius](https://avatars.githubusercontent.com/u/7780244?v=4)](https://github.com/nalysius "nalysius (1 commits)")[![ngnpope](https://avatars.githubusercontent.com/u/2855582?v=4)](https://github.com/ngnpope "ngnpope (1 commits)")[![openbrian](https://avatars.githubusercontent.com/u/2524550?v=4)](https://github.com/openbrian "openbrian (1 commits)")[![r-kovalenko](https://avatars.githubusercontent.com/u/2025625?v=4)](https://github.com/r-kovalenko "r-kovalenko (1 commits)")[![RobLoach](https://avatars.githubusercontent.com/u/25086?v=4)](https://github.com/RobLoach "RobLoach (1 commits)")[![robo47](https://avatars.githubusercontent.com/u/110477?v=4)](https://github.com/robo47 "robo47 (1 commits)")[![royopa](https://avatars.githubusercontent.com/u/442991?v=4)](https://github.com/royopa "royopa (1 commits)")[![skodak](https://avatars.githubusercontent.com/u/241453?v=4)](https://github.com/skodak "skodak (1 commits)")[![stefanotorresi](https://avatars.githubusercontent.com/u/2952427?v=4)](https://github.com/stefanotorresi "stefanotorresi (1 commits)")[![sylfabre](https://avatars.githubusercontent.com/u/3177556?v=4)](https://github.com/sylfabre "sylfabre (1 commits)")[![tmuras](https://avatars.githubusercontent.com/u/695281?v=4)](https://github.com/tmuras "tmuras (1 commits)")[![tyx](https://avatars.githubusercontent.com/u/245494?v=4)](https://github.com/tyx "tyx (1 commits)")[![bfroehle](https://avatars.githubusercontent.com/u/204333?v=4)](https://github.com/bfroehle "bfroehle (1 commits)")

---

Tags

html

### Embed Badge

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

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

###  Alternatives

[ezyang/htmlpurifier

Standards compliant HTML filter written in PHP

3.4k327.6M445](/packages/ezyang-htmlpurifier)[symfony/html-sanitizer

Provides an object-oriented API to sanitize untrusted HTML input for safe insertion into a document's DOM.

27932.2M63](/packages/symfony-html-sanitizer)[stevebauman/purify

An HTML Purifier / Sanitizer for Laravel

5325.6M19](/packages/stevebauman-purify)[xemlock/htmlpurifier-html5

HTML5 support for HTML Purifier

1052.9M11](/packages/xemlock-htmlpurifier-html5)[form-manager/form-manager

PHP-HTML form manager

16041.0k7](/packages/form-manager-form-manager)[aura/input

This package contains tools to describe and filter user inputs from an HTML form, including sub-forms/sub-fieldsets, fieldset collections, an interface for injecting custom filter systems, and CSRF protection. Note that this package does not include output functionality, although the "hints" provided by the Form object can be used with any presentation system to generate an HTML form.

6678.4k4](/packages/aura-input)

PHPackages © 2026

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