marked vs markdown-it vs remark vs turndown vs showdown vs remarkable
Markdown Processing Libraries in JavaScript
markedmarkdown-itremarkturndownshowdownremarkable
Markdown Processing Libraries in JavaScript

JavaScript Markdown processing libraries enable parsing, rendering, and transforming Markdown content into HTML or other formats. These tools are essential for applications that support user-generated rich text, such as documentation sites, content editors, and note-taking apps. markdown-it is highly extensible with a rich plugin ecosystem and supports CommonMark compliance. marked is a fast, lightweight, and widely used parser with simple configuration. remark is part of the unified ecosystem, treating Markdown as an abstract syntax tree (AST), enabling powerful programmatic transformations. remarkable focuses on speed and safety with a clean API and built-in XSS protection. showdown is one of the oldest converters, offering extensive customization but with a less modern architecture. turndown serves the opposite purpose—it converts HTML back into Markdown, useful for content migration or rich-text editing workflows.

Npm Package Weekly Downloads Trend
3 Years
Github Stars Ranking
Stat Detail
Package
Downloads
Stars
Size
Issues
Publish
License
marked20,264,41436,268433 kB2423 days agoMIT
markdown-it12,439,34520,795767 kB552 years agoMIT
remark3,009,5558,64015.7 kB42 years agoMIT
turndown2,174,81110,546192 kB1462 months agoMIT
showdown1,094,06014,779801 kB227-MIT
remarkable987,7335,821-1326 years agoMIT
Feature Comparison: marked vs markdown-it vs remark vs turndown vs showdown vs remarkable

Standards Compliance

  • marked:

    marked has improved CommonMark compliance in recent versions but may still deviate in edge cases. GFM support is built-in.

  • markdown-it:

    markdown-it is CommonMark-compliant by default and passes the official test suite. It also supports GitHub Flavored Markdown (GFM) via plugins.

  • remark:

    remark parses Markdown into an AST following CommonMark closely (via mdast-util-from-markdown) and supports GFM through optional plugins.

  • turndown:

    turndown focuses on HTML-to-Markdown fidelity rather than Markdown parsing, so standards compliance isn’t applicable in the same way.

  • showdown:

    showdown is not CommonMark-compliant and has inconsistent behavior with edge cases; it predates CommonMark and uses its own interpretation.

  • remarkable:

    remarkable is not fully CommonMark-compliant but covers most practical use cases. It implements a subset of GFM like tables and strikethrough.

Extensibility & Ecosystem

  • marked:

    marked allows limited extension via tokenizer and renderer overrides, but lacks a formal plugin system.

  • markdown-it:

    markdown-it has a rich plugin ecosystem (e.g., for math, emoji, containers) and supports custom syntax via inline rules and block parsers.

  • remark:

    remark is the most extensible—part of the unified (unified.js) ecosystem, allowing deep transformations using plugins (e.g., linting, formatting, converting to React).

  • turndown:

    turndown supports custom rules for handling specific HTML elements during conversion, enabling fine-grained control over output Markdown.

  • showdown:

    showdown supports extensions (e.g., custom parsers, filters), but the extension model is verbose and less intuitive.

  • remarkable:

    remarkable offers limited extensibility through custom renderers and rules, but no formal plugin architecture.

Performance

  • marked:

    marked is very fast for basic use cases and has low overhead, making it suitable for high-throughput rendering.

  • markdown-it:

    markdown-it is highly optimized and among the fastest parsers, especially with syntax extensions enabled selectively.

  • remark:

    remark is slower than raw parsers due to AST construction and transformation pipeline, but this is offset by its flexibility in complex workflows.

  • turndown:

    turndown is efficient for HTML-to-Markdown conversion, but performance depends on input HTML complexity and custom rule logic.

  • showdown:

    showdown is slower than modern alternatives due to its legacy architecture and regex-heavy parsing.

  • remarkable:

    remarkable is designed for speed and benchmarks well, particularly in safe mode with minimal escaping overhead.

Security (XSS Protection)

  • marked:

    marked disables HTML by default in newer versions and provides an sanitize option (deprecated) or recommends using DOMPurify for output sanitization.

  • markdown-it:

    markdown-it does not sanitize HTML by default; use the markdown-it-sanitizer plugin or post-process output to prevent XSS.

  • remark:

    remark does not render HTML directly, so XSS risk depends on downstream renderers (e.g., rehype-stringify). Safe handling requires explicit sanitization.

  • turndown:

    turndown is not a rendering library, so XSS is not a concern during conversion—but the resulting Markdown could produce unsafe HTML if rendered unsafely later.

  • showdown:

    showdown allows HTML by default; XSS must be mitigated manually via escaping or external sanitizers.

  • remarkable:

    remarkable includes built-in, optional HTML escaping and a ‘safe’ mode that strips dangerous tags, offering strong out-of-the-box XSS protection.

Code Examples

  • marked:

    marked example

    const marked = require('marked');
    const html = marked.parse('# Hello\n\nThis is **bold**.');
    console.log(html);
    
  • markdown-it:

    markdown-it example

    const MarkdownIt = require('markdown-it');
    const md = new MarkdownIt();
    const html = md.render('# Hello\n\nThis is **bold**.');
    console.log(html);
    
  • remark:

    remark example

    const remark = require('remark');
    const html = require('remark-html');
    const processor = remark().use(html);
    const result = processor.processSync('# Hello\n\nThis is **bold**.').toString();
    console.log(result);
    
  • turndown:

    turndown example

    const Turndown = require('turndown');
    const turndown = new Turndown();
    const markdown = turndown.turndown('<h1>Hello</h1><p>This is <strong>bold</strong>.</p>');
    console.log(markdown);
    
  • showdown:

    showdown example

    const showdown = require('showdown');
    const converter = new showdown.Converter();
    const html = converter.makeHtml('# Hello\n\nThis is **bold**.');
    console.log(html);
    
  • remarkable:

    remarkable example

    const Remarkable = require('remarkable');
    const md = new Remarkable();
    const html = md.render('# Hello\n\nThis is **bold**.');
    console.log(html);
    
How to Choose: marked vs markdown-it vs remark vs turndown vs showdown vs remarkable
  • marked:

    Choose marked if you want a simple, fast, and battle-tested Markdown-to-HTML converter with minimal setup and good CommonMark support.

  • markdown-it:

    Choose markdown-it if you need a fast, standards-compliant parser with strong plugin support for syntax extensions (e.g., tables, task lists, math). Ideal for documentation platforms or editors requiring customization.

  • remark:

    Choose remark if you need to programmatically analyze, transform, or lint Markdown via AST manipulation—especially when integrated with other unified tools like rehype or retext.

  • turndown:

    Choose turndown when you need to convert HTML (e.g., from a WYSIWYG editor) back into clean Markdown—complementary to Markdown-to-HTML libraries.

  • showdown:

    Choose showdown only if maintaining legacy code or needing highly customizable parsing extensions; it’s less performant and less standards-compliant than modern alternatives.

  • remarkable:

    Choose remarkable if performance and built-in security (XSS prevention) are priorities, and you don’t need extensive plugin ecosystems.

README for marked

Marked

npm install size downloads github actions snyk

  • ⚡ built for speed
  • ⬇️ low-level compiler for parsing markdown without caching or blocking for long periods of time
  • ⚖️ light-weight while implementing all markdown features from the supported flavors & specifications
  • 🌐 works in a browser, on a server, or from a command line interface (CLI)

Demo

Check out the demo page to see Marked in action ⛹️

Docs

Our documentation pages are also rendered using marked 💯

Also read about:

Compatibility

Node.js: Only current and LTS Node.js versions are supported. End of life Node.js versions may become incompatible with Marked at any point in time.

Browser: Baseline Widely Available

Installation

CLI:

npm install -g marked

In-browser:

npm install marked

Usage

Warning: 🚨 Marked does not sanitize the output HTML. Please use a sanitize library, like DOMPurify (recommended), sanitize-html or insane on the output HTML! 🚨

DOMPurify.sanitize(marked.parse(`<img src="x" onerror="alert('not happening')">`));

CLI

# Example with stdin input
$ marked -o hello.html
hello world
^D
$ cat hello.html
<p>hello world</p>
# Print all options
$ marked --help

Browser

<!doctype html>
<html>
<head>
  <meta charset="utf-8"/>
  <title>Marked in the browser</title>
</head>
<body>
  <div id="content"></div>
  <script src="https://cdn.jsdelivr.net/npm/marked/lib/marked.umd.js"></script>
  <script>
    document.getElementById('content').innerHTML =
      marked.parse('# Marked in the browser\n\nRendered by **marked**.');
  </script>
</body>
</html>

or import esm module

<script type="module">
  import { marked } from "https://cdn.jsdelivr.net/npm/marked/lib/marked.esm.js";
  document.getElementById('content').innerHTML =
    marked.parse('# Marked in the browser\n\nRendered by **marked**.');
</script>

License

Copyright (c) 2018+, MarkedJS. (MIT License) Copyright (c) 2011-2018, Christopher Jeffrey. (MIT License)