Alir3z4

html2text: Convert HTML into Readable Markdown

html2text turns HTML into readable Markdown from Python code or the command line. It suits scripts and applications that need text from web content, with options for handling links and code blocks.

QuietPythonGPL-3.0LibraryCLIMarkdown
View on GitHub Compare
Stars
2.2k
Forks
301
Stars, last 30 days
+1
Last commit
12 months ago
Contributors
70

Our take

Quietno commits in the last 90 days and no release in a year

Health score

34/100

How it is scored
Activity
19
Community
75
Issues
21
Pull requests
20

+1 stars in the last 30 days

This is a focused HTML-to-Markdown utility with a long history and broad contributor base, but its recent maintenance signals are quiet.

Good fit if

  • You need a Python library or command-line tool for converting HTML to Markdown-style text.
  • Python 3.9 or later is available in your environment.
  • You can use GPL-3.0-licensed software and the project's current maintenance pace suits your needs.

Look elsewhere if

  • You need a project showing recent releases or active issue and pull-request handling, since none were recorded in the measured recent period.
  • Your workflow needs to preserve HTML rather than convert it to text and Markdown.
  • GPL-3.0 does not fit your distribution or licensing requirements.
All health signals
Last commit2025-10-28 (12 months ago)
Commits, last 90 days0
Releases, last 12 months0 (latest 2025.4.15, 2025-04-15)
Contributors70 (top contributor: 40% of commits)
Issues closed, last 90 days0
Pull requests merged, last 90 days0
Project age12 years

Checked on 2026-10-13 with the GitHub API.

Project history

Daily GitHub snapshots since Oct 7, 2026. History covers stars and forks; health signals are not tracked historically.

Selected snapshot

Stars

2,174

Forks

309

Change since Nov 13, 2026: 0 stars·0 forks

Overview

html2text is a Python library and command-line tool for converting HTML into readable text formatted as Markdown. It helps when you need to extract text from HTML without building your own parser and formatting rules.

Use it in a Python program through its API, or run it on a file from the command line. Its output is Markdown-style text rather than a preserved HTML document.

Key Features

  • Convert HTML content to readable Markdown-formatted text.
  • Use the html2text function for a straightforward conversion in Python.
  • Configure conversion behavior with an HTML2Text instance.
  • Ignore links or include them as Markdown links.
  • Choose reference-style links instead of inline links.
  • Mark preformatted and code blocks with [code]...[/code].
  • Use the command-line interface with an input filename and optional encoding.

Use Cases

  • Python developers can turn HTML snippets into Markdown for notes, reports, or text-processing pipelines.
  • Command-line users can convert saved HTML files to readable text without writing a separate script.
  • Teams processing web content can retain link destinations in Markdown, or omit links when only the text matters.
  • Applications that need plain-text representations of formatted HTML can use its API and adjust link or code-block handling.

What you need

Detected in the repository

  • Python >=3.9 (from pyproject.toml)
  • A test suite and automated checks on GitHub Actions

License in plain words

GPL-3.0strong copyleft

  • Commercial use: yes
  • Modify and redistribute: yes
  • You must keep: the license notice
  • Share your changes: yes, the full source of anything you distribute that includes it, under the GPL
  • Includes an explicit patent grant from the contributors:

A summary, not legal advice: the LICENSE file is what applies.

Getting Started

Install from PyPI:

pip install html2text

See the repository README and usage documentation for command-line options and Python examples.

Alternatives

  • markitdown: MarkItDown handles many document formats, not just HTML, and targets document-to-Markdown workflows.
  • e2m: E2M processes web pages, documents, and audio through configurable parsers, rather than focusing on HTML conversion.
ProjectLanguageLicenseStarsStatus
html2textPythonGPL-3.02.2kQuiet
markitdownPythonMIT194kActive
e2mJupyter NotebookApache-2.01.3kInactive

Considerations

The project is marked Quiet: there have been no commits in the measured recent period and no release in over a year. Although it has many contributors and is not concentrated around one person, the measured period also shows no issues closed or pull requests merged, so teams should assess whether that maintenance pace is acceptable. The README identifies GPLv3 as the license; review its obligations before incorporating or distributing the software.

Found this useful?

Share it with someone who would like html2text.

Comparisons