# Install html2text with Homebrew, apk, apt, dnf, MacPorts, Nix, pacman, zypper

Advanced HTML-to-text converter. Version 2.4.0 via Homebrew; verified from local package data.

## Install

```sh
sudo av install brew:html2text
```

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install html2text
```

  Evidence: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install html2text
```

  Evidence: MacPorts ports tree: textproc/html2text/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

### Linux

- apk (92%):

```sh
sudo apk add html2text
```

  Evidence: Alpine Linux edge package indexes: html2text from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz

- Debian apt (92%):

```sh
sudo apt install html2text
```

  Evidence: Debian stable package indexes: html2text from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz

- dnf (92%):

```sh
sudo dnf install python3-html2text
```

  Evidence: Fedora Rawhide package metadata: python3-html2text from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst

- Nix (92%):

```sh
nix profile install nixpkgs#html2text
```

  Evidence: nixpkgs package indexes: pkgs/by-name/ht/html2text/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

- pacman (92%):

```sh
sudo pacman -S python-html2text
```

  Evidence: Arch Linux sync databases: python-html2text from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz

- zypper (92%):

```sh
sudo zypper install python311-html2text
```

  Evidence: openSUSE Tumbleweed package metadata: python311-html2text from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst

## Package facts

- **Package key:** brew:html2text
- **Package manager:** Homebrew
- **Package manager page:** <https://formulae.brew.sh/formula/html2text>
- **Version:** 2.4.0
- **Source summary:** Advanced HTML-to-text converter
- **Homepage:** <https://gitlab.com/grobian/html2text>
- **Repository:** <https://gitlab.com/grobian/html2text>
- **Upstream docs:** <https://gitlab.com/grobian/html2text#readme>
- **License:** GPL-2.0-or-later
- **Source archive:** <https://gitlab.com/-/project/48313341/uploads/8526650dd42218b3493ce7ca0a3eeb1e/html2text-2.4.0.tar.gz>
- **Generated:** 2026-07-08T18:08:21+00:00

## Executables

- html2text (cli)
- html2text (alias)

## Install behavior

- Post-install hook: not defined
- Bottle: available on arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux

## Freshness

- Page generated: 2026-07-08
- Package-manager version: 2.4.0
- Local data: ok
- Upstream repository: https://gitlab.com/grobian/html2text
- info: No package-manager update timestamp was available.
- info: Release/tag comparison is only available for GitHub repositories.
## Project history and usage

html2text renders HTML into terminal- and email-friendly plain text. The grobian-maintained project is a continuation of Martin Bayer's older html2text, with a focus on mail clients, terminal width, links, tables, character sets, and ANSI rendering.

### Project history

The README states that the repository continues the project formerly hosted at mbayer.de/html2text and carries patches that were no longer available from the original sources. It also states that version 2.0 made the GitLab repository the official home.

GitLab tag metadata places v2.0.0 in 2020, followed by v2.1.x in 2022, v2.2.x in 2023, and v2.3.0 and v2.4.0 in 2025. The ChangeLog shows that later work added autotools-based builds, compatibility flags, whitespace normalization, ANSI escape output, color handling, and direct URL retrieval.

### Adoption history

The tool is packaged across Homebrew, Debian, Ubuntu, Alpine, MacPorts, Nix, Arch, and Fedora-family ecosystems. Its adoption is helped by a stable command name and by mailcap integration examples for text-mode mail clients such as Mutt.

### How it is used

The README's central workflow is rendering text/html parts for terminal email. It shows a mailcap entry using html2text with ANSI output, link references, charset conversion, and terminal-width wrapping, plus Mutt configuration that auto-views HTML mail through the converter.

### Why package nerds care

html2text is package-nerd material because it solves a stubborn Unix desktop problem: making HTML email tolerable in text-mode tools. It is small enough for a mailcap line, but specialized enough to preserve tables, links, alignment, and character-set behavior better than a bare text dump.

### Timeline

- Pre-2020: Martin Bayer's html2text provided the original project line.
- 2020: v2.0.0 established the grobian GitLab repository as the official home.
- 2022: v2.1.x releases continued the 2.x series.
- 2023: v2.2.0 moved the build system to autotools and added compatibility and whitespace work.
- 2025: v2.3.0 added ANSI and color handling; v2.4.0 added direct remote URL retrieval.

### Related projects

- Related tools include lynx -dump, w3m -dump, pandoc, Python html2text, and mailcap-driven HTML viewers used by Mutt and similar text mail clients.

### Sources

- Homebrew and distribution package metadata support package-manager adoption.
- The GitLab ChangeLog and tag API document the 2.x release evolution.
- The GitLab README documents origin, email-focused usage, and official-home status from version 2.0.


## Security Notes

narrow executable package without higher-risk signals.

- **Geiger risk:** green / low
- narrow executable package without higher-risk signals

## Source Database Details

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** html2text
- **Version Scheme:** 0
- **Revision:** 0
- **Head Version:** HEAD
- **Bottle Stable Root URL:** <https://ghcr.io/v2/homebrew/core>
- **Deprecated:** no
- **Disabled:** no
- **Keg Only:** no
- **URL Keys:** head, stable

## Other Package-Manager Records

- Debian apt - html2text - 2.2.3-3: normalized package name match | Debian stable package indexes: html2text from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | advanced HTML to text converter | https://gitlab.com/grobian/html2text
- Nix - html2text: normalized package name match | nixpkgs package indexes: pkgs/by-name/ht/html2text/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - html2text - 1.3.2a-28: normalized package name match | Ubuntu 24.04 LTS package indexes: html2text from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | advanced HTML to text converter | https://github.com/grobian/html2text
- apk - html2text - 2.4.0-r0: normalized package name match | Alpine Linux edge package indexes: html2text from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | html2text is a command line utility, written in C++, that converts HTML documents into plain text. | https://github.com/grobian/html2text/
- apk - html2text-doc - 2.4.0-r0: normalized package name match | Alpine Linux edge package indexes: html2text-doc from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | html2text is a command line utility, written in C++, that converts HTML documents into plain text. (documentation) | https://github.com/grobian/html2text/
- dnf - python3-html2text - 2025.4.15-7.fc45: normalized package name match | Fedora Rawhide package metadata: python3-html2text from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | Convert HTML to Markdown-formatted text | https://github.com/Alir3z4/html2text/
- pacman - python-html2text - 2025.4.15-2: normalized package name match | Arch Linux sync databases: python-html2text from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | A HTML to markdown-structured text converter | https://github.com/Alir3z4/html2text
- zypper - python311-html2text - 2025.4.15-1.4: normalized package name match | openSUSE Tumbleweed package metadata: python311-html2text from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst | Python script for turning HTML into Markdown text | https://github.com/Alir3z4/html2text/
- zypper - python313-html2text - 2025.4.15-1.4: normalized package name match | openSUSE Tumbleweed package metadata: python313-html2text from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst | Python script for turning HTML into Markdown text | https://github.com/Alir3z4/html2text/
- zypper - python314-html2text - 2025.4.15-1.4: normalized package name match | openSUSE Tumbleweed package metadata: python314-html2text from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst | Python script for turning HTML into Markdown text | https://github.com/Alir3z4/html2text/
- MacPorts - html2text: normalized package name match | MacPorts ports tree: textproc/html2text/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1


## Related links

- [Terminal utility packages](https://www.automicvault.com/pkg/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Text processing packages](https://www.automicvault.com/pkg/text-processing-tools/) - Matched text, document, or structured-data processing metadata.
- [Developer build packages](https://www.automicvault.com/pkg/developer-build-tools/) - Matched build, compiler, generator, or developer workflow metadata.
- [Networking and protocol packages](https://www.automicvault.com/pkg/networking-protocol-tools/) - Matched network, protocol, or remote-service metadata.
- [html2markdown](https://www.automicvault.com/pkg/brew/html2markdown/) - Shares av.db curated category or tags: cli, conversion, converter, developer-tools, html.
- [markdown](https://www.automicvault.com/pkg/brew/markdown/) - Shares av.db curated category or tags: cli, conversion, developer-tools, html, markup.
- [vilistextum](https://www.automicvault.com/pkg/brew/vilistextum/) - Shares av.db curated category or tags: cli, conversion, developer-tools, html, markup.
- [htmldoc](https://www.automicvault.com/pkg/brew/htmldoc/) - Shares av.db curated category or tags: cli, conversion, converter, developer-tools, html.
- [discount](https://www.automicvault.com/pkg/brew/discount/) - Shares av.db curated category or tags: cli, developer-tools, html, markup.
- [html-xml-utils](https://www.automicvault.com/pkg/brew/html-xml-utils/) - Shares av.db curated category or tags: cli, developer-tools, html, markup.
- [htmlcleaner](https://www.automicvault.com/pkg/brew/htmlcleaner/) - Shares av.db curated category or tags: cli, developer-tools, html, markup.
- [htmlcompressor](https://www.automicvault.com/pkg/brew/htmlcompressor/) - Shares av.db curated category or tags: cli, developer-tools, html, markup.
- [msc-generator](https://www.automicvault.com/pkg/brew/msc-generator/) - Local package facts share a topical domain. Shared terms: cli, developer, developer-tools, text.

## Combined YAML source

View the package source record on GitHub. [combined/html2text.yml](https://github.com/automic-vault/db/blob/main/combined/html2text.yml)


## Sources

- Nucleus package database
- Geiger risk classifier
- package-page enrichment
- curated package history
- package version freshness
- av.db category and tag curation
- package relationship graph
- external package-manager database matches
- cross-ecosystem install command graph
