marked vs markdown-it vs remark vs turndown vs showdown vs remarkable
Markdown Parsing and Conversion Libraries Comparison
1 Year
markedmarkdown-itremarkturndownshowdownremarkable
What's Markdown Parsing and Conversion Libraries?

Markdown parsing and conversion libraries are essential tools in web development that allow developers to convert Markdown text into HTML or other formats. These libraries provide various features such as extensibility, speed, and customization options, making them suitable for different use cases ranging from simple Markdown rendering to complex document processing. They enable developers to easily integrate Markdown support into their applications, enhancing content management and user experience.

Package Weekly Downloads Trend
Github Stars Ranking
Stat Detail
Package
Downloads
Stars
Size
Issues
Publish
License
marked12,945,95634,304968 kB1715 hours agoMIT
markdown-it8,492,30319,316767 kB54a year agoMIT
remark2,163,1908,07015.7 kB22 years agoMIT
turndown1,166,2239,515192 kB133a year agoMIT
showdown835,09614,542801 kB222-MIT
remarkable833,1795,787-1315 years agoMIT
Feature Comparison: marked vs markdown-it vs remark vs turndown vs showdown vs remarkable

Performance

  • marked:

    marked is designed for speed and efficiency, making it one of the fastest Markdown parsers available. It is optimized for quick conversion, which is beneficial for applications that need to render Markdown content on-the-fly.

  • markdown-it:

    markdown-it is known for its high performance, capable of parsing large documents quickly. It uses a state machine approach to optimize the parsing process, making it suitable for applications that require fast rendering of Markdown content.

  • remark:

    remark's performance can vary based on the complexity of the transformations applied to the syntax tree. While it may not be the fastest for simple conversions, it excels in scenarios where extensive processing is required.

  • turndown:

    turndown is efficient in converting HTML back to Markdown, focusing on maintaining the original structure and formatting. Its performance is generally good for most use cases.

  • showdown:

    showdown offers a balance between performance and versatility. It may not be the fastest option, but it provides a good compromise for applications needing both Markdown to HTML and HTML to Markdown conversion.

  • remarkable:

    remarkable is lightweight and fast, providing quick Markdown rendering without unnecessary overhead. It is suitable for applications where performance is a key concern.

Extensibility

  • marked:

    marked is less extensible compared to markdown-it, focusing more on simplicity. It does not support plugins, which may limit customization options for advanced use cases.

  • markdown-it:

    markdown-it is highly extensible, allowing developers to create custom plugins to enhance its functionality. This makes it ideal for projects that require specific Markdown features or custom parsing rules.

  • remark:

    remark is built around a plugin architecture, enabling extensive customization and manipulation of the Markdown syntax tree. This makes it suitable for complex workflows that require tailored processing.

  • turndown:

    turndown is designed for a specific purpose (HTML to Markdown conversion) and does not offer extensive extensibility options, making it less flexible for broader use cases.

  • showdown:

    showdown supports some customization through options but is not as extensible as markdown-it or remark. It is suitable for standard use cases without extensive modifications.

  • remarkable:

    remarkable offers limited extensibility, focusing on providing a fast and simple Markdown rendering experience. It is less suited for projects that require heavy customization.

Learning Curve

  • marked:

    marked is easy to learn and use, with a simple API that allows developers to get started quickly. It is ideal for those who want a quick solution without a steep learning curve.

  • markdown-it:

    markdown-it has a moderate learning curve, especially for developers looking to leverage its plugin system. Basic usage is straightforward, but advanced features may require additional learning.

  • remark:

    remark has a steeper learning curve due to its focus on syntax tree manipulation and plugin architecture. Developers may need to invest more time to fully understand its capabilities.

  • turndown:

    turndown is easy to learn, especially for those familiar with Markdown. Its API is straightforward, making it accessible for developers needing HTML to Markdown conversion.

  • showdown:

    showdown has a gentle learning curve, with clear documentation and a simple API. It is user-friendly for developers who need basic Markdown conversion functionality.

  • remarkable:

    remarkable is easy to pick up and use, making it suitable for developers who want a straightforward Markdown rendering solution without complex configurations.

Use Cases

  • marked:

    marked is perfect for simple applications that need fast Markdown rendering without complex features. It is often used in static site generators and documentation tools.

  • markdown-it:

    markdown-it is ideal for applications requiring advanced Markdown features, such as custom syntax, plugins, and high performance. It is suitable for content management systems and blogging platforms.

  • remark:

    remark is best suited for projects that require extensive Markdown processing and manipulation, such as static site generators or tools that analyze Markdown content.

  • turndown:

    turndown is specifically designed for converting HTML back to Markdown, making it ideal for applications that involve editing HTML content.

  • showdown:

    showdown is versatile and can be used in applications needing both Markdown to HTML and HTML to Markdown conversion, such as editors or content management systems.

  • remarkable:

    remarkable is great for projects that prioritize speed and simplicity, making it suitable for quick Markdown rendering in web applications.

How to Choose: marked vs markdown-it vs remark vs turndown vs showdown vs remarkable
  • marked:

    Choose marked for its simplicity and speed. It is lightweight and has a straightforward API, making it a great choice for projects that need quick Markdown conversion without additional complexity.

  • markdown-it:

    Choose markdown-it for its high performance and extensibility. It supports plugins, allowing you to customize the parsing process and add features as needed. Ideal for applications requiring advanced Markdown features and flexibility.

  • remark:

    Choose remark if you need a powerful tool for processing Markdown with a focus on syntax tree manipulation. It allows for extensive transformations and analysis of Markdown content, making it suitable for complex workflows.

  • turndown:

    Choose turndown if you need to convert HTML back to Markdown. It is designed for this specific purpose, making it ideal for applications that involve editing or transforming content between these two formats.

  • showdown:

    Choose showdown if you need a versatile library that can convert Markdown to HTML and vice versa. It is useful for applications that require bidirectional conversion and supports various Markdown flavors.

  • remarkable:

    Choose remarkable for its ease of use and fast performance. It is designed for quick Markdown rendering and is a good option for projects that prioritize speed and simplicity over extensive customization.

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

Checkout 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: Not IE11 :)

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/marked.min.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) 2011-2022, Christopher Jeffrey. (MIT License)