multimark
Python bindings to cmark: CommonMark parsing and rendering (HTML, LaTeX, man, XML)
What it is and what it does
Multimark is a Python wrapper around cmark-gfm, the C reference implementation of CommonMark with GitHub Flavored Markdown extensions. It renders Markdown text to five different output formats—HTML, LaTeX, groff man, XML (AST), and normalized CommonMark—all from a single lightweight package with no system dependencies beyond Python 3.9+.
The package is designed for convenience: it accepts named boolean keyword arguments like `smart=True` for typographic punctuation, `unsafe=True` to allow raw HTML passthrough, and `footnotes=True` to enable footnote syntax. It supports GFM extensions (table, strikethrough, autolink, tagfilter, tasklist) by name. Safe-by-default behavior means raw HTML is blocked unless explicitly enabled, and the API avoids opaque bitmasks in favor of readable options.
Use it for:
- Convert user-submitted Markdown to HTML for web display with built-in XSS protection via safe-by-default rendering.
- Generate LaTeX or man-page documentation from Markdown source for offline distribution.
- Parse and normalize Markdown with GitHub extensions (tables, strikethrough) for content processing pipelines.
- Render Markdown with smart typography (curly quotes, em-dashes) for publication-quality output.
- Extract Markdown structure as XML (AST) for programmatic analysis or transformation.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Converts Markdown to HTML, LaTeX, groff man, XML, or normalized CommonMark using cmark-gfm, with support for GitHub Flavored Markdown extensions.
Yes, if you need to render Markdown to multiple formats or require GitHub Flavored Markdown support. The active maintenance, permissive dual license, and safe-by-default design make it a solid choice. Medium install friction is typical for compiled packages and not a barrier. The Beta status is worth noting if you require strict API stability guarantees.
Install
multimark on PyPI
pip
pip install multimarkuv
uv add multimarkpoetry
poetry add multimarkInstalling multimark
Before you install
Medium install friction due to compiled wheels, but prebuilt binaries are available for Linux, macOS, and Windows on Python 3.9+. Active maintenance as of 2026-08-08 with recent release history.
License in practice
Dual-licensed under MIT and BSD-2-Clause (the latter covering the vendored cmark-gfm library). Both are permissive; no restrictions on commercial or proprietary use.
Quickstart
pip install multimark
from multimark import markdown_to_html, markdown_to_latex
html = markdown_to_html("**Hello**, *world*!")
latex = markdown_to_latex("**Hello**, *world*!")
Requires Python 3.9 or later; prebuilt wheels available for Linux, macOS, and Windows.
Verify before relying
- Whether the 14% performance advantage over cmarkgfm holds across different input sizes and use patterns.
- Stability guarantees or API compatibility policy given the Beta development status.
Package facts
| License | MIT AND BSD-2-Clause (permissive) |
| Python support | supports the current Python release (>=3.9) |
| Install friction | medium — platform-specific wheel |
| Runtime dependencies | 2 — cffi, click |
| Maintenance | actively maintained — 6 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 505,206/month — #6,293 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: multimark-0.3.2-cp39-abi3-macosx_10_9_x86_64.whl; multimark-0.3.2-cp39-abi3-macosx_11_0_arm64.whl; multimark-0.3.2-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl; multimark-0.3.2-cp39-abi3-musllinux_1_2_x86_64.whl; multimark-0.3.2-cp39-abi3-win_amd64.whl
Keywords: markdown, commonmark, cmark-gfm, html, latex, gfm
Tags
More Markdown packages
Docutils converts plaintext documentation in…
unclear · top 1,000 on PyPI
MarkdownConverts Markdown text to HTML using a Python…
permissive · top 1,000 on PyPI
SphinxSphinx generates professional documentation…
permissive · top 1,000 on PyPI
pytablewriterConverts tabular data into formatted tables for…
permissive · top 5,000 on PyPI
trafilaturaTrafilatura extracts main text, metadata, and…
permissive · top 5,000 on PyPI
sphinx_designA Sphinx extension that adds responsive web…
permissive · top 5,000 on PyPI
cmarkgfmConverts CommonMark and GitHub-flavored…
permissive · top 15,000 on PyPI
comrakRenders CommonMark and GitHub Flavored Markdown…
permissive · top 15,000 on PyPI
py-gfmConverts GitHub-Flavored Markdown to HTML using…
permissive · top 15,000 on PyPI
commonmarkParses Markdown text according to the…
permissive · top 5,000 on PyPI
markoMarko is a pure Python markdown parser that…
permissive · top 5,000 on PyPI
gh-md-to-htmlConverts GitHub-flavored Markdown to HTML with…
unclear · top 15,000 on PyPI
markdown-it-pyrsA Rust-backed Python Markdown parser that…
permissive · top 15,000 on PyPI
mdformat-gfmMdformat-gfm extends mdformat to format GitHub…
permissive · top 5,000 on PyPI
html-to-markdownConverts real-world HTML—including malformed…
permissive · top 5,000 on PyPI
mdurlProvides URL parsing and manipulation utilities…
permissive · top 100 on PyPI