tinyhtml5
HTML parser based on the WHATWG HTML specification
Decision gist · record as of 2026-08-14
Yes, if you need to parse HTML5 and want a lightweight, dependency-light solution. The package is actively maintained, has no known vulnerabilities, installs with low friction, and carries a permissive MIT license. It's well-suited for scripting and data extraction tasks where a full HTML rendering engine is overkill. Start with it if your use case is parsing, not rendering.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.10 or later.
- Low friction: pure Python wheel with a single lightweight dependency (webencodings).
- Actively maintained with recent commits; marked Production/Stable and tested on both CPython and PyPy.
License · maintenance · safety
permissive license (permissive) — MIT license (permissive) means you can use, modify, and distribute freely with minimal restrictions; no copyright assignment required from contributors.
last release 2026-03-05 (162 days) · last repo commit 2026-03-05 · 9 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 29,381,392 downloads/mo, #818 on PyPI
Alternatives
Verify before relying
pip install tinyhtml5
import tinyhtml5
tree = tinyhtml5.parse('<html><body>Hello</body></html>')
root = tree.getroot()- Performance characteristics compared to other HTML5 parsers (speed, memory usage on large documents).
- Whether the ElementTree output is compatible with standard library xml.etree.ElementTree workflows.
- Specific HTML5 spec compliance details beyond 'WHATWG HTML specification'.
What it is and what it does
tinyhtml5 is a minimal HTML5 parser that reads HTML documents—even broken or non-standard ones—and converts them into an ElementTree structure. It's a simplified fork of html5lib, designed to be lightweight while still handling real-world HTML that doesn't conform to strict standards. The parser depends only on webencodings for character encoding support.
You would use this when you need to extract or manipulate HTML content programmatically but don't want the overhead of a full browser engine or a large dependency tree. It's suitable for web scraping, HTML analysis, or any task where you need to parse HTML into a tree structure that Python's standard ElementTree tools can work with.
Use it for
- Web scraping: parse HTML from web pages and extract data using XPath or tree traversal.
- HTML validation and cleanup: transform malformed HTML into a normalized ElementTree for analysis.
- Content extraction: build tools that read and process HTML documents without a browser.
- HTML-to-XML conversion: convert HTML into a structured tree format for downstream processing.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you need to parse HTML5 and want a lightweight, dependency-light solution.
The package is actively maintained, has no known vulnerabilities, installs with low friction, and carries a permissive MIT license. It's well-suited for scripting and data extraction tasks where a full HTML rendering engine is overkill. Start with it if your use case is parsing, not rendering.
Install
tinyhtml5 on PyPI
Before you install
Low friction: pure Python wheel with a single lightweight dependency (webencodings). Actively maintained with recent commits; marked Production/Stable and tested on both CPython and PyPy.
Requires Python 3.10 or later.
License in practice
MIT license (permissive) means you can use, modify, and distribute freely with minimal restrictions; no copyright assignment required from contributors.
Quickstart
pip install tinyhtml5
import tinyhtml5
tree = tinyhtml5.parse('<html><body>Hello</body></html>')
root = tree.getroot()
Verify before relying
- Performance characteristics compared to other HTML5 parsers (speed, memory usage on large documents).
- Whether the ElementTree output is compatible with standard library xml.etree.ElementTree workflows.
- Specific HTML5 spec compliance details beyond 'WHATWG HTML specification'.
Package facts
| License | permissive license permissive |
| Python support | Supports the current Python release >=3.10 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 1 packagewebencodings |
| Maintenance | Actively maintained 162 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 29,381,392 / month, #818 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPyTopic :: Software Development :: Libraries :: Python ModulesTopic :: Text Processing :: Markup :: HTML |
Evidence: tinyhtml5-2.1.0-py3-none-any.whl
Tags
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 › “html5 parser”
- tinyhtml5Parses HTML5 documents—including malformed ones—into an ElementTree…
- selectolaxselectolax is a fast HTML5 parser with CSS selector support, written…
- html5rdfParses HTML documents into tree structures compatible with RDFLib,…
Give your agent the search over MCP, or paste the wish link into any chat.
More Python Modules packages
Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.
Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.
Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.
PyYAML parses and emits YAML 1.1 data format, enabling serialization and deserialization of configuration files and Python objects to and from human-readable YAML text.
Pydantic validates Python data structures against type hints, coercing and checking input at runtime to ensure it matches a declared schema.
Provides reusable metadata objects for use with PEP-593 `typing.Annotated` to express common constraints like bounds, collection sizes, and predicates on types.
Install it if you use or build libraries that need to express type constraints in a standardized, inspectable way—or if you want to annotate your own types with…
Provides runtime tools to inspect and introspect Python type annotations, enabling programmatic examination of type hints at execution time.
See also html5lib · html5rdf · tinycss2 · cssselect2 · turbohtml · tinyhtml · html5tagger · tree-sitter-html · weasyprint · lxml