# nh3

Python binding to the ammonia HTML sanitization library, for cleaning HTML fragments.


Source: https://findsoftware.frbit.cloud/nh3/
Last reviewed: 2026-11-16
Listed since: 2026-11-16

## Record

### Links

- home: https://nh3.readthedocs.io/en/latest/
- repository: https://github.com/messense/nh3
- docs: https://nh3.readthedocs.io/en/latest/

### Identity

- status: active
- maintainer: Messense Lv
- maintainerType: individual
- parent: unknown
- firstRelease: 2021
- hqCountry: unknown

### Kind

- category: library
- hosting: python
- language: python
- runtime: python
- runtimeMin: python 3.8
- basedOn: unknown

### Content

- contentStore: not applicable
- databases: not applicable
- adminUi: not applicable
- headlessApi: not applicable
- templating: not applicable
- i18n: not applicable

### Rendering and deploy

- runsAs: not applicable
- renderingModes: not applicable
- installMethod: pip

### License

- licenseModel: open-source
- license: MIT

### Releases

- currentMajor: 0
- latestReleaseDate: 2026-08-24

### Adoption

- githubStargazers: 407
- packagistDownloads: not applicable
- npmWeeklyDownloads: not applicable
- contributors: 17
- pluginCount: unknown
- packagistMonthlyDownloads: unknown
- ecosystemsMonthlyDownloads: unknown
- httpArchiveSites: unknown
- wordpressActiveInstalls: unknown
- dependentRepos: 552
- dependentPackages: 673

### Sources

- urls: https://nh3.readthedocs.io/en/latest/ (read 2026-11-16)
- urls: https://api.github.com/repos/messense/nh3 (read 2026-11-16)
- urls: https://nh3.readthedocs.io/en/latest/ (read 2026-11-16)
- firstRelease: https://api.github.com/repos/messense/nh3/commits/v0.1.0 (read 2026-11-16)
- maintainer: https://github.com/messense/nh3/blob/main/LICENSE (read 2026-11-16)
- maintainerType: https://github.com/messense/nh3/blob/main/LICENSE (read 2026-11-16)
- category: https://github.com/messense/nh3/blob/main/README.md (read 2026-11-16)
- language: https://github.com/messense/nh3/blob/main/README.md (read 2026-11-16)
- runtime: https://github.com/messense/nh3/blob/v0.3.7/pyproject.toml (read 2026-11-16)
- runtimeMin: https://github.com/messense/nh3/blob/v0.3.7/pyproject.toml (read 2026-11-16)
- installMethod: https://github.com/messense/nh3/blob/main/README.md (read 2026-11-16)
- license: https://github.com/messense/nh3/blob/main/README.md (read 2026-11-16)
- currentMajor: https://api.github.com/repos/messense/nh3/releases/latest (read 2026-11-16)
- latestReleaseDate: https://api.github.com/repos/messense/nh3/releases/latest (read 2026-11-16)
- githubStargazers: https://api.github.com/repos/messense/nh3 (read 2026-11-16)
- contributors: https://api.github.com/repos/messense/nh3/contributors?per_page=1 (read 2026-11-16)
- dependentPackages: https://packages.ecosyste.ms/api/v1/registries/pypi.org/packages/nh3 (read 2026-11-16)
- dependentRepos: https://packages.ecosyste.ms/api/v1/registries/pypi.org/packages/nh3 (read 2026-11-16)

## Notes

nh3 lets Python code clean HTML fragments by calling ammonia, an HTML sanitization library written in Rust. The [documentation](https://nh3.readthedocs.io/en/latest/) is hosted on Read the Docs.

## Worth knowing

The package is a wrapper, so the sanitizing itself happens in the Rust library underneath.

---

Data licensed CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Attributes are recorded, never scored; absent means unknown.
Credit, in full: FindSoftware, CC BY 4.0
