PACKAGE · MARKDOWN

marked

A markdown parser built for speed

WEEKLY DOWNLOADS 52.1M
STARS 37.0K
FORKS 3.6K
OPEN ISSUES 13
GZIP SIZE 12.9 kB
UNPACKED SIZE 468.4 kB
DEPENDENCIES 1
LAST UPDATED 5mo ago
DOWNLOAD TRENDS

marked downloads — last 12 months

Download trends for marked1 download series from Aug 2025 to Jul 2026. Use left and right arrow keys to inspect monthly values.062.5M125.0M187.5M250.0MAug 2025NovFebMayJul 2026
marked
ABOUT MARKED

Marked is a high-performance JavaScript library for parsing Markdown into HTML. It tackles the common development need of rendering user-generated content or documentation written in Markdown format into displayable HTML within web applications or other platforms. By providing a fast and reliable parser, Marked simplifies the process of integrating rich text content without requiring manual HTML generation.

Designed with speed and extensibility in mind, Marked aims to be a go-to solution for developers who require efficient Markdown processing. Its core philosophy prioritizes performance, making it suitable for applications where rendering Markdown frequently or handling large amounts of text is a requirement. The library is built for developers who need a robust Markdown parser that doesn't become a bottleneck in their application's performance.

The primary API of Marked is straightforward, centered around the `marked.parse()` function, which accepts a Markdown string and returns an HTML string. For more granular control, developers can utilize options to customize parsing behavior, such as enabling GitHub Flavored Markdown (GFM) compliance, controlling sanitization, or defining custom rendering rules for specific Markdown elements. This approach allows for flexible integration into various rendering pipelines.

Marked integrates seamlessly into modern JavaScript development workflows and frameworks. It can be used in both Node.js environments for server-side rendering or static site generation, and in browser environments for client-side Markdown rendering. Its small bundle size makes it an attractive option for front-end applications where minimizing JavaScript payload is crucial. The package's extensive use and high weekly download count suggest broad adoption across different project types.

With a gzipped bundle size of only 12.9 kB, Marked demonstrates a strong commitment to performance and efficiency. This small footprint is particularly beneficial for web applications where initial load times are critical. The library is actively maintained, as indicated by its recent update history, and boasts a substantial number of GitHub stars and forks, reflecting its maturity and community trust.

While Marked is highly capable, it's important to note that it focuses on speed and CommonMark compliance, with GFM support. Developers requiring highly specialized Markdown dialects or complex, non-standard extensions might need to explore alternative solutions or supplement Marked with additional processing. For basic Markdown to HTML conversion, however, Marked provides a robust and efficient solution.

WHEN TO USE
  • When you need to convert Markdown strings to HTML in a Node.js server environment.
  • When rendering user-submitted comments or forum posts written in Markdown to HTML on the client-side.
  • When building static site generators that process Markdown files into HTML pages.
  • When integrating documentation written in Markdown into a web application.
  • When prioritizing a small JavaScript bundle size for front-end Markdown rendering.
  • When leveraging GitHub Flavored Markdown (GFM) syntax for your content.
WHEN NOT TO USE
  • If your primary goal is to generate rich text documents and not specifically Markdown to HTML conversion, consider a rich text editor.
  • If you require a parser that supports highly obscure or custom Markdown extensions not covered by GFM.
  • If you only need to display static HTML content and do not require dynamic Markdown parsing.
  • If extensive, fine-grained control over every aspect of HTML output beyond Marked's options is essential, a custom AST-based approach might be necessary.
  • If you are building a content management system where a WYSIWYG editor is preferred over plain Markdown input.

CORRECTIONS

Spot wrong data here?

A short note helps us fix it.

Anonymous · No account · No email back

COMPARISONS 5
marked vs mdast-util-mdx-jsx ★ 32 · 29.6M/wk marked vs rehype ★ 2.2K · 3.3M/wk marked vs shiki ★ 13.7K · 15.2M/wk marked vs remark ★ 8.7K · 4.3M/wk marked vs @mdx-js/react ★ 19.7K · 16.0M/wk