marko
A markdown parser with high extensibility.
What it is and what it does
Marko is a markdown-to-HTML parser written in pure Python that prioritizes strict compliance with the CommonMark specification v0.31.2 over raw speed. It solves the problem of parsing markdown reliably when spec compliance matters more than performance—useful when you need predictable, standards-compliant rendering across different markdown sources.
The package is designed for extensibility: you can load built-in extensions (footnote, toc, pangu, codehilite) or write your own to add custom markdown features. It works both as a library (via `marko.convert()` or the `Markdown` class) and as a command-line tool for rendering markdown files to HTML. The trade-off is explicit: it runs slower than some alternatives because it implements the full CommonMark spec rather than a subset.
Use it for:
- Build a static site generator or documentation tool that needs reliable, spec-compliant markdown rendering.
- Parse user-submitted markdown content in a web application where consistent output across different inputs is critical.
- Extend markdown syntax for domain-specific needs (e.g., adding custom footnotes or table-of-contents generation).
- Convert markdown files to HTML from the command line with optional extensions like syntax highlighting.
- Integrate markdown processing into a Python application where CommonMark compliance is a requirement.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Marko is a pure Python markdown parser that converts markdown text to HTML while adhering to CommonMark specification v0.31.2, with built-in support for extensions like footnotes, table of contents, and syntax highlighting.
Yes, if CommonMark compliance and extensibility matter for your use case. Marko is actively maintained, has no external dependencies, and supports current Python versions. Install it if you need reliable spec-compliant markdown parsing; skip it if you prioritize raw parsing speed over standards compliance.
Install
marko on PyPI
pip
pip install markouv
uv add markopoetry
poetry add markoInstalling marko
Before you install
Installation is straightforward with no runtime dependencies. The package is actively maintained, with a recent release and consistent commit activity. It supports Python 3.9 through 3.14.
License in practice
Released under the MIT License, a permissive open-source license that allows free use, modification, and distribution with minimal restrictions.
Quickstart
pip install marko
import marko
print(marko.convert("# Hello\n\nThis is markdown."))
Requires Python 3.9 or higher.
Verify before relying
- Whether the performance trade-off versus non-compliant parsers is acceptable for your use case (described as three times slower than Python-Markdown).
- Availability and maturity of community-contributed extensions beyond the four shipped extensions.
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.9) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | actively maintained — 2 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 6,438,890/month — #1,910 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: marko-2.2.4-py3-none-any.whl
Tags
More Markup packages
PyYAML parses and emits YAML 1.1 data format,…
permissive · top 100 on PyPI
markdown-it-pyA Python markdown parser that converts markdown…
permissive · top 100 on PyPI
beautifulsoup4Beautiful Soup parses HTML and XML documents…
permissive · top 100 on PyPI
et-xmlfileet_xmlfile writes large XML files with minimal…
permissive · top 1,000 on PyPI
tomlkitParses and edits TOML files while preserving…
permissive · top 1,000 on PyPI
docstring-parserParses Python docstrings in ReST, Google,…
permissive · top 1,000 on PyPI
commonmarkParses Markdown text according to the…
permissive · top 5,000 on PyPI
multimarkConverts Markdown to HTML, LaTeX, groff man,…
permissive · top 15,000 on PyPI
mistuneMistune converts Markdown text to HTML using a…
permissive · top 1,000 on PyPI
MarkdownConverts Markdown text to HTML using a Python…
permissive · top 1,000 on PyPI
pyromarkpyromark is a CommonMark-compliant Markdown…
unclear · top 15,000 on PyPI
myst-parserMyST-Parser extends CommonMark-compliant…
permissive · top 5,000 on PyPI
cmarkgfmConverts CommonMark and GitHub-flavored…
permissive · top 15,000 on PyPI
markdown-it-pyrsA Rust-backed Python Markdown parser that…
permissive · top 15,000 on PyPI
mdurlProvides URL parsing and manipulation utilities…
permissive · top 100 on PyPI