Markdown libraries

Parse and render Markdown inside your own application. Below are the most widely used libraries grouped by language. Most follow the CommonMark spec, so they parse the basics identically and differ mainly in speed, API style and which extensions they bundle.

JavaScript & TypeScript

markdown-it

Fast, CommonMark-compliant and highly pluggable — the engine behind many editors.

CommonMarkplugins

marked

Tiny and very quick, with no dependencies — ideal for running in the browser.

lightweightbrowser

remark

Markdown as an abstract syntax tree you can inspect and transform; part of the unified ecosystem.

ASTunified

micromark

A small, CommonMark- and GFM-compliant tokenizer; the low-level core that powers remark.

CommonMarkGFM

Python

Python-Markdown

The long-standing reference implementation, with a rich extension API.

extensions

markdown-it-py

A faithful port of markdown-it — CommonMark-compliant and pluggable.

CommonMarkplugins

mistune

A fast pure-Python parser with a plugin system and sane defaults.

fast

mistletoe

A pure-Python, CommonMark-compliant parser designed to be easy to extend with custom renderers.

CommonMarkrenderers

Ruby

kramdown

A pure-Ruby parser with an extended syntax and multiple output formats.

pure Ruby

Redcarpet

A fast, safe library binding the C Sundown parser; long used by GitHub.

fastC-backed

CommonMarker

Ruby bindings to GitHub's cmark-gfm — CommonMark and GitHub Flavored Markdown.

CommonMarkGFM

PHP

league/commonmark

A highly extensible, CommonMark- and GFM-compliant parser by The PHP League; used by Laravel.

CommonMarkGFM

Parsedown

A single-file, dependency-free parser that is fast and simple to drop in.

lightweight

Go

goldmark

CommonMark-compliant, extensible and fast — the parser used by Hugo.

CommonMarkextensible

gomarkdown

A parser and HTML renderer with an exposed AST, forked from Blackfriday.

AST

Blackfriday

The original, battle-tested Go Markdown processor.

classic

Rust

pulldown-cmark

A fast, safe pull parser; the de-facto standard across the Rust ecosystem.

CommonMarkfast

comrak

A CommonMark- and GFM-compatible parser and formatter, ported from cmark-gfm.

CommonMarkGFM

Java / JVM

commonmark-java

A small, fast, spec-compliant parser with a clean extension mechanism.

CommonMark

flexmark-java

A feature-rich, highly configurable parser with a large set of extensions.

extensions

C / C++

cmark

The official CommonMark reference implementation — a C library and command-line tool.

referenceCommonMark

MD4C

An exceptionally fast, SAX-like C parser with CommonMark and GFM support.

fastGFM

.NET

Markdig

A fast, extensible, CommonMark-compliant parser for .NET with a rich set of extensions.

CommonMarkextensions

Swift

swift-markdown

Apple's official Swift library for parsing, building and rewriting Markdown, built on cmark-gfm.

CommonMarkGFM

Haskell

Pandoc

The universal document converter is also a Haskell library for reading and writing dozens of markup formats.

conversion

cmark

Haskell bindings to the libcmark CommonMark reference parser.

CommonMark