marked vs micromark vs markdown-it vs remark vs showdown
Markdown Parsing Libraries Comparison
1 Year
markedmicromarkmarkdown-itremarkshowdownSimilar Packages:
What's Markdown Parsing Libraries?

Markdown parsing libraries are tools that convert Markdown text into HTML. They are essential for web development, especially for applications that allow users to input formatted text. These libraries vary in features, performance, and extensibility, making it important to choose the right one based on specific project requirements. Each library has its unique strengths, catering to different use cases and developer preferences.

Package Weekly Downloads Trend
Github Stars Ranking
Stat Detail
Package
Downloads
Stars
Size
Issues
Publish
License
marked11,553,07634,015968 kB2023 days agoMIT
micromark11,001,7151,905210 kB45 days agoMIT
markdown-it7,498,80819,039767 kB48a year agoMIT
remark2,040,8427,98815.7 kB0a year agoMIT
showdown748,98714,487801 kB222-MIT
Feature Comparison: marked vs micromark vs markdown-it vs remark vs showdown

Extensibility

  • marked:

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

  • micromark:

    micromark is built with a modular architecture, allowing developers to create custom extensions and parsers. This makes it a great choice for those who want to implement specific Markdown features or syntax.

  • markdown-it:

    markdown-it is designed with extensibility in mind, allowing developers to create custom plugins to enhance its functionality. This makes it suitable for applications that require specific Markdown features or custom rendering logic.

  • remark:

    remark is highly extensible, offering a rich ecosystem of plugins that can transform Markdown content in various ways. It allows for extensive manipulation and customization, making it ideal for complex Markdown processing tasks.

  • showdown:

    showdown has limited extensibility compared to others, focusing primarily on converting Markdown to HTML. It offers some configuration options but does not support plugins or extensive customization.

Performance

  • marked:

    marked is known for its speed, making it one of the fastest Markdown parsers available. It is ideal for applications where performance is a critical factor, especially when processing large amounts of Markdown text.

  • micromark:

    micromark is designed for performance and compliance, offering a balance between speed and adherence to the CommonMark specification. It is efficient for projects that require both performance and strict Markdown compliance.

  • markdown-it:

    markdown-it is optimized for performance, providing fast parsing speeds while maintaining flexibility. It is suitable for applications that require quick rendering of Markdown content without sacrificing features.

  • remark:

    remark may not be as fast as other libraries due to its extensive transformation capabilities, but it is still performant for most use cases. It is best for projects where Markdown manipulation is more important than raw parsing speed.

  • showdown:

    showdown provides decent performance for simple Markdown to HTML conversions. While it may not be the fastest option, it is sufficient for lightweight applications that do not require heavy processing.

Learning Curve

  • marked:

    marked is easy to learn and integrate into projects, making it a great choice for developers who need a quick solution without a steep learning curve. Its simplicity allows for rapid implementation.

  • micromark:

    micromark has a steeper learning curve due to its low-level API and focus on compliance. It is best suited for developers who are comfortable with Markdown specifications and want to build custom solutions.

  • markdown-it:

    markdown-it has a moderate learning curve, especially for developers who want to take full advantage of its extensibility features. Basic usage is straightforward, but advanced customization may require a deeper understanding of its API.

  • remark:

    remark has a moderate learning curve, particularly for those unfamiliar with its plugin architecture. However, once understood, it offers powerful capabilities for Markdown processing and transformation.

  • showdown:

    showdown is very easy to learn and use, making it ideal for beginners or those looking for a quick Markdown conversion solution. Its straightforward API allows for rapid implementation.

Usage Scenario

  • marked:

    marked is ideal for scenarios where performance is critical, such as real-time Markdown previews in web applications or lightweight static site generators.

  • micromark:

    micromark is best for projects that need strict adherence to Markdown specifications, such as documentation generators or tools that require precise Markdown parsing.

  • markdown-it:

    markdown-it is suitable for applications that require a high degree of customization and extensibility, such as content management systems or blogging platforms where users can input complex Markdown.

  • remark:

    remark excels in scenarios that involve complex Markdown transformations, such as static site generators that need to process and manipulate Markdown content extensively.

  • showdown:

    showdown is perfect for simple applications that require quick Markdown to HTML conversion, such as comment sections or basic content editors.

Community and Support

  • marked:

    marked has a solid user base and good documentation, making it easy to find support and resources. Its simplicity and performance have made it a popular choice among developers.

  • micromark:

    micromark is relatively new but has gained traction due to its compliance and performance. The community is growing, and documentation is improving, making it a viable option for modern projects.

  • markdown-it:

    markdown-it has a strong community and is well-documented, providing ample resources for developers looking to extend its functionality. The availability of plugins and examples enhances its usability.

  • remark:

    remark has a vibrant community and a rich ecosystem of plugins, providing extensive support and resources for developers. Its documentation is comprehensive, aiding in learning and implementation.

  • showdown:

    showdown has a smaller community compared to others, but it is still well-documented and easy to use. Support may be limited, but its simplicity makes it easy to implement without much assistance.

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

    Select marked for a fast and straightforward Markdown parser that is easy to use and integrates well with existing projects. It is suitable for applications where performance is critical and where you need a simple solution without many dependencies.

  • micromark:

    Opt for micromark if you are looking for a modern, low-level Markdown parser that adheres closely to the CommonMark specification. It is perfect for developers who want to build their own Markdown processing tools or need a highly compliant parser.

  • markdown-it:

    Choose markdown-it if you need a highly extensible and customizable Markdown parser that supports plugins and offers a robust API. It's ideal for projects requiring extensive customization and advanced features like syntax highlighting and custom rendering.

  • remark:

    Use remark if you require a powerful Markdown processor that allows for extensive transformations and manipulations of Markdown content. It is particularly beneficial for projects that involve complex Markdown processing and require a rich ecosystem of plugins.

  • showdown:

    Choose showdown if you need a lightweight and easy-to-use Markdown to HTML converter that works well in both client-side and server-side environments. It is suitable for quick implementations and projects that prioritize simplicity.

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)