mistletoe
A fast, extensible Markdown parser in pure Python.
Decision gist · record as of 2026-08-14
Yes. mistletoe is actively maintained, has no dependencies, installs with low friction, carries no known vulnerabilities, and offers a clean API for both library and CLI use. Install it if you need CommonMark-compliant Markdown parsing with extensible rendering or if you want to programmatically manipulate Markdown documents.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Low friction: pure Python with no runtime dependencies, distributed as a wheel, and actively maintained with a recent release.
License · maintenance · safety
MIT (permissive) — MIT license permits commercial and private use with minimal restrictions; you must include a copy of the license in distributions.
last release 2026-07-11 (34 days) · last repo commit 2026-07-11 · 1,061 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 2,251,437 downloads/mo, #3,188 on PyPI
Alternatives
Verify before relying
pip install mistletoe
import mistletoe
with open('foo.md', 'r') as fin:
rendered = mistletoe.markdown(fin)- Whether performance claims ('fastest CommonMark implementation in pure Python') are independently verified or benchmarked.
- Whether custom token definitions and renderer extensions are documented with examples beyond the description excerpt.
What it is and what it does
mistletoe parses Markdown into an abstract syntax tree (AST) and renders it to multiple output formats. It implements the CommonMark specification for predictable, spec-compliant parsing, and supports native extensions like strikethrough and tables. The design separates parsing from rendering, so you can swap renderers without modifying core logic.
The package ships with built-in renderers for HTML, LaTeX, AST (for debugging), and Markdown (for reflowing or automated edits). Additional renderers for MathJax, Pygments highlighting, GitHub wiki links, Jira, XWiki, and Scheme are available in a contrib package. It works as both a Python library and a command-line tool, and includes an interactive REPL mode for testing.
Use it for
- Convert Markdown files to HTML or LaTeX for documentation generation or publishing workflows.
- Parse Markdown into an AST to programmatically inspect or transform document structure.
- Reflow Markdown text to a specific line length or apply automated edits to Markdown documents.
- Build custom renderers for domain-specific output formats by extending the parser's token system.
- Use the command-line tool to batch-convert Markdown files without writing Python code.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
mistletoe is actively maintained, has no dependencies, installs with low friction, carries no known vulnerabilities, and offers a clean API for both library and CLI use. Install it if you need CommonMark-compliant Markdown parsing with extensible rendering or if you want to programmatically manipulate Markdown documents.
Install
mistletoe on PyPI
Before you install
Low friction: pure Python with no runtime dependencies, distributed as a wheel, and actively maintained with a recent release.
License in practice
MIT license permits commercial and private use with minimal restrictions; you must include a copy of the license in distributions.
Quickstart
pip install mistletoe
import mistletoe
with open('foo.md', 'r') as fin:
rendered = mistletoe.markdown(fin)
Verify before relying
- Whether performance claims ('fastest CommonMark implementation in pure Python') are independently verified or benchmarked.
- Whether custom token definitions and renderer extensions are documented with examples beyond the description excerpt.
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release ~=3.5 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | None |
| Maintenance | Actively maintained 34 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 2,251,437 / month, #3,188 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 LicenseProgramming 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.5Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPyTopic :: Software Development :: Libraries :: Python ModulesTopic :: Text Processing :: Markup :: Markdown |
Evidence: mistletoe-1.6.0-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
An agent finds packages by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language. Give your agent the search over MCP.
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 mistune · commonmark · markdown-it-py · markdown-it-pyrs · myst-parser · tree-sitter-markdown · marko · rich-text-renderer · multimark · pystache