$npx skillfedfor your agent

html-text

Extract text from HTML

With conditionsPyPI HTMLReleased Oct 20251.4M downloads / moMITPure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — html_text-0.7.1-py3-none-any.whl
v0.7.1 · released 2025-10-06 · Python >=3.9 · 2 runtime deps: lxml, lxml-html-clean

Yes, if you need to extract clean text from HTML with structure preservation. Low install friction, permissive license, no known vulnerabilities, and stable API make it a safe choice. Maintenance is aging but the repository remains active; suitable for production use in text extraction pipelines.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires lxml, which has compiled C dependencies; installation may need a C compiler or pre-built wheels for your platform.
  • Low friction: pure Python wheel with only lxml and lxml-html-clean as runtime dependencies.
  • Last release 312 days ago; repository is active and not archived, though maintenance status is aging.

License · maintenance · safety

MIT (permissive) — MIT license is permissive; you can use, modify, and distribute this package freely in commercial and private projects with minimal restrictions.

last release 2025-10-06 (312 days) · last repo commit 2025-10-06 · 19 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 1,433,260 downloads/mo, #3,908 on PyPI

Verify before relying

pip install html-text

import html_text
text = html_text.extract_text('<p>Hello</p><p>world</p>')
print(text)
  • Whether parsel is an optional dependency or required for selector_to_text functionality
  • Performance characteristics on large HTML documents or batch processing scenarios
Same gist for agents: .md · .json

What it is and what it does

html-text extracts readable text from HTML by removing invisible content (styles, scripts, comments) and normalizing whitespace in a way that mimics how a browser renders the page. Unlike simple XPath or Beautiful Soup text extraction, it adds intelligent spacing around inline elements and can insert newlines after headers and paragraphs to preserve document structure in the output.

The package provides multiple entry points: a high-level extract_text() function for raw HTML strings, lower-level etree_to_text() for pre-parsed lxml trees, and integration with parsel.Selector for targeted extraction from specific elements. It's designed for both display purposes and machine learning feature extraction, where clean, normalized text is needed as input to classification pipelines.

Use it for

  • Extract readable text from web pages for search indexing or content aggregation
  • Prepare HTML content as features for text classification or NLP models
  • Convert web scraping results to plain text for downstream text processing
  • Remove boilerplate (styles, scripts) while preserving document structure via newlines
  • Build text-only versions of web content for accessibility or archival

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

With conditions

Yes, if you need to extract clean text from HTML with structure preservation.

Low install friction, permissive license, no known vulnerabilities, and stable API make it a safe choice. Maintenance is aging but the repository remains active; suitable for production use in text extraction pipelines.

Install

html-text on PyPI

Before you install

Low friction: pure Python wheel with only lxml and lxml-html-clean as runtime dependencies. Last release 312 days ago; repository is active and not archived, though maintenance status is aging.

Requires lxml, which has compiled C dependencies; installation may need a C compiler or pre-built wheels for your platform.

License in practice

MIT license is permissive; you can use, modify, and distribute this package freely in commercial and private projects with minimal restrictions.

Quickstart

pip install html-text

import html_text
text = html_text.extract_text('<p>Hello</p><p>world</p>')
print(text)

Verify before relying

  • Whether parsel is an optional dependency or required for selector_to_text functionality
  • Performance characteristics on large HTML documents or batch processing scenarios

Package facts

LicenseMIT permissive
Python supportSupports the current Python release >=3.9
Install frictionLow. Pure-Python wheel
Runtime dependencies
2 packages
lxmllxml-html-clean
MaintenanceAging 312 days since the last release
Last repo commit
First released
Downloads1,433,260 / month, #3,908 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Development Status :: 4 - BetaIntended Audience :: DevelopersNatural Language :: EnglishProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.9

Evidence: html_text-0.7.1-py3-none-any.whl

Tags

Capabilities
extract text from htmlhtml to plain textremove html tagsclean html contenttext extraction from web pageshtml parsing and text extractionconvert html to text
Topics
web-scrapingtext-extractionnlp-preprocessing

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “convert html to text”

  • html-textExtracts plain text from HTML while filtering out styles, scripts,…
  • html2textConverts HTML to clean, readable plain text or Markdown-formatted…
  • markdown2Converts Markdown text to HTML using a fast, complete Python…

Give your agent the search over MCP, or paste the wish link into any chat.

More HTML packages

MarkupSafe Worth it
PyPI · Dynamic Content · released Sep 2025

MarkupSafe provides a text object that escapes special characters so untrusted strings can be safely embedded in HTML and XML without injection attacks.

BSD-3-Clausecompiled wheel · 3.9+aging
797.1Mdownloads / mo
Jinja2 Worth it
PyPI · Dynamic Content · released Mar 2025

Jinja2 is a templating engine that renders dynamic content by combining templates with Python-like syntax and data, supporting template inheritance, macros, autoescaping, and sandboxed execution.

BSD-3-Clausepure Python · 3.7+aging
718.6Mdownloads / mo
beautifulsoup4 Worth it
PyPI · Python Modules · released Jun 2026

Beautiful Soup parses HTML and XML documents into a navigable tree, providing Pythonic methods to search, iterate, and modify the parsed content.

Install it if you need to parse or extract data from markup documents.

MITpure Python · 3.7.0+
432.1Mdownloads / mo
lxml Worth it
PyPI · Python Modules · released May 2026

lxml provides Python bindings to libxml2 and libxslt, enabling parsing, validation, and transformation of XML and HTML documents through an ElementTree-compatible API with support for XPath, XSLT, and schema validation.

Install it if you need robust XML/HTML parsing, validation, or transformation; avoid it only if you must stay pure-Python and can accept slower performance.

permissive licensecompiled wheel · 3.8+
416.8Mdownloads / mo
docutils With conditions
PyPI · Software Development · released May 2026

Docutils converts plaintext documentation in reStructuredText format into multiple output formats including HTML, XML, and LaTeX using a modular processing system.

BSD-3-Clausepure Python · 3.9+
225.6Mdownloads / mo
Markdown Worth it
PyPI · Python Modules · released Jul 2026

Converts Markdown text to HTML using a Python implementation of John Gruber's Markdown specification, with support for extensions.

Install it if you need to parse Markdown in Python.

BSD-3-Clausepure Python · 3.10+
121.7Mdownloads / mo

See also jusText · paragraphs · w3lib · parsel · proces · html-sanitizer · boilerpy3 · pynliner · css-inline · antiword