html2text
Convert HTML to Markdown-structured text for parsing and transforming web content.
Scraping, browsers and parsing PyPI GPL-3.0-or-later HTML parsing and extraction
How html2text is used
html2text is a dependency in 9 of the 6,211 public GitHub projects set up for AI coding agents that we scanned, too few to describe it from them alone. Our scan also samples projects by dependency (Solana 2,717, Ethereum and EVM 1,533, 3D and games 2,862, agent frameworks and SDKs 11,237); counting those, it appears in 149 projects, and what it is used with below comes from all of them. The most used alternative in our scan is markdownify (8 projects). Projects that use it most often also use NumPy (77.9%), OpenAI Python Library (76.5%), Pydantic (76.5%).
html2text popularity over time
Gid Score 54: downloads 74, use in agent projects 56, GitHub stars 24, downloads trend 53 (each 0-100). How it is calculated.
Often used with html2text
| NumPy | 77.9% of html2text projects · 13.4× more than average |
|---|---|
| OpenAI Python Library | 76.5% of html2text projects · 19.4× more than average |
| Pydantic | 76.5% of html2text projects · 8.9× more than average |
| python-dotenv | 73.2% of html2text projects · 8.0× more than average |
| Beautiful Soup | 72.5% of html2text projects · 33.6× more than average |
| Pillow | 67.1% of html2text projects · 17.5× more than average |
| PyYAML | 67.1% of html2text projects · 11.3× more than average |
| Requests | 67.1% of html2text projects · 9.9× more than average |
From all 149 projects in our scan that use html2text, including the dependency samples.
By coding agent
| GitHub Copilot | 0.2% of projects set up for it |
|---|
Share of public repos configured for each agent that list html2text as a dependency.
Install
| Package | pip install html2text |
|---|---|
| Main stacks | Python (148), Next.js (1) |
| Example projects | ANative-Lab/EvoAgentX, VRSEN/OpenSwarm, apconw/Aix-DB, GAIR-NLP/DeepResearcher, SleepySoft/IntelligenceIntegrationSystem |
Alternatives to html2text
Tools that do the same job, so a project picks one or the other. Add-ons and libraries used alongside html2text are not listed here; they are in "Often used with".
| Tool | Gid Score | Used in agent projects | Downloads / wk | GitHub stars | License |
|---|---|---|---|---|---|
| markdownify pypi Convert HTML to markdown for content extraction and transformation. |
60 | 8 (0.5%) | 12.9M | 2,254 | MIT |
More in Scraping, browsers and parsing: Beautiful Soup Puppeteer lxml Playwright Core Playwright (Python) Cheerio fast-xml-parser jsonc-parser