skillfed

marko

A markdown parser with high extensibility.

marko v2.2.4 6.4M downloads/30d#1,910 on PyPI463
Permissive license MIT Active released

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 marko

uv

uv add marko

poetry

poetry add marko

Installing 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

Development Status :: 5 - Production/StableIntended Audience :: DevelopersOperating System :: OS IndependentProgramming 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

Tags

markdown parser pythoncommonmark compliant parsermarkdown to html converterextensible markdown librarymarkdown with custom extensionspython markdown renderercommonmark spec parser
markdown-parsercommonmarkextensible

More Markup packages