A compact Rust Markdown parser

Markdown in.
Safe HTML out.

marked-rs is a dependency-free Markdown-to-HTML parser with a small core, opt-in GFM support, and native, Node.js, and WebAssembly surfaces.

marked-rs
$ printf '# Hello, Rust!\n\n**Fast** Markdown.\n' | cargo run --quiet
<h1>Hello, Rust!</h1>
<p><strong>Fast</strong> Markdown.</p>

Focused by design

The pieces you need,
without the weight.

No runtime dependencies

A compact parsing pipeline that stays easy to understand, test, and extend.

Safe HTML by default

Source text and generated attributes are escaped before they reach the renderer.

Built for every surface

Use the Rust library and CLI today, or enable Node.js and WebAssembly bindings.

Quick start

One small API.

Render Markdown directly, or inspect the document AST before adding a custom renderer.

let html = marked_rs::parse(
  "# Hello\n\nA **small** parser."
);

// <h1>Hello</h1> …

Try it in your browser

A real Rust parser,
right in your tab.

Edit the Markdown and see the HTML produced by marked-rs running through WebAssembly.

Generated HTML Loading WebAssembly…

          

Representative benchmark

Fast where it counts.

Median throughput on a 1.27 MiB mixed-feature Markdown corpus.

32.52MiB/s
marked-rs
1.5×faster than
markdown-it
1.7×faster than
Marked

Ready when you are

Build something
pleasantly fast.

Start with marked-rs