skillfed

multimark

Python bindings to cmark: CommonMark parsing and rendering (HTML, LaTeX, man, XML)

multimark v0.3.2 505.2K downloads/30d#6,293 on PyPI7
Permissive license MIT AND BSD-2-Clause Active released

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 multimark

uv

uv add multimark

poetry

poetry add multimark

Installing 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

Development Status :: 4 - BetaIntended Audience :: DevelopersOperating System :: OS IndependentProgramming Language :: CProgramming 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.9Topic :: Text Processing :: Markup :: Markdown

Tags

markdown to html convertercommonmark parser pythonmarkdown to latex renderergfm github flavored markdownmarkdown to multiple formatscmark bindings pythonmarkdown processor
markdown-renderinggfm-extensionsmulti-format-output

More Markdown packages