OSS TanbouSign in with GitHub

convert Markdown to HTML in Node.js, browsers, and the CLI and extend parsing through extensions

About these scores

OSS scale score is an unbounded metric that log-compresses and weights Stars, Watchers, Forks, and Contributors. Discovery score is the current OSS scale score minus the score at discovery. Update pace is commits in the last 30 days, growth momentum is the OSS scale score difference within the recent observation window, and OSS health is a 0–100 rating based on available recency, Community Health, and release data.

Stars
37,223
Primary language
TypeScript
License
MIT
Repository last updated
Oct 5, 2026
On this page

Overview

Marked is a Markdown parser and compiler that converts Markdown into HTML. It is designed as a lightweight low-level parser for Node.js, browsers, and CLI workflows, with options and custom extensions for adapting tokenization and rendering.

Features and best fit

Based on official documentation; not hands-on tested · Content checked:

Key features

Convert Markdown strings to HTML with marked.parse

In Node.js, pass Markdown text to marked.parse() to produce HTML. The package also ships browser-oriented UMD and ESM builds for client-side rendering.

Sources: [1][2]

Convert standard input or files from the CLI

The globally installed marked command can read Markdown and write HTML with -o; marked --help lists available command-line options.

Sources: [1]

Extend parsing and rendering with options and custom extensions

The official documentation exposes configuration options and an extension system so projects can add custom tokenizers, renderers, and related Markdown processing behavior.

Sources: [1]

Best fit

Fits Markdown previews, documentation, and content-conversion pipelines

It is useful when server-side conversion, browser previews, and CLI batch workflows should share a compact Markdown parser.

Sources: [1]

Before adoption

Generated HTML is not sanitized

The README explicitly states that Marked does not sanitize its output and recommends sanitizers such as DOMPurify or sanitize-html. Untrusted Markdown output should not be inserted into the DOM without sanitization.

Sources: [1]

Version 18.0.14 requires Node.js 20 or later and targets Baseline Widely Available browsers

Package metadata requires Node.js >=20, while the README states support for current/LTS Node.js releases and browsers in the Baseline Widely Available set.

Sources: [1][2]

Official sources

  1. [1]Marked v18.0.14 README(2026-10-05)
  2. [2]Marked v18.0.14 package metadata(2026-10-05)
  3. [3]Marked v18.0.14 release(2026-10-05)
  4. [4]Marked MIT license(2026-10-05)
Supplemental curator note

Marked makes it easy to share Markdown-to-HTML parsing across Node.js, browsers, and CLI workflows, but sanitizing generated HTML is explicitly outside its responsibility. When rendering untrusted input, plan to pair it with a sanitizer such as DOMPurify as the README recommends.

Try it in 3 steps

  1. 1

    Check Node.js and install Marked 18.0.14

    Verify the package's Node.js 20+ requirement and pin the stable release in a temporary directory.

    node -e 'if (Number(process.versions.node.split(".")[0]) < 20) throw new Error("Marked 18 requires Node.js >= 20")' && demo=$(mktemp -d "${TMPDIR:-/tmp}/marked.XXXXXX") && cd "$demo" && npm init -y >/dev/null && npm install --save-exact marked@18.0.14
  2. 2

    Create a script that converts Markdown to HTML

    Follow the README's Node.js usage pattern with marked.parse() and convert a heading plus strong text.

    printf "%s\n" "import { marked } from 'marked';" "const html = marked.parse('# Hello **Marked**');" "console.log(html);" "if (!html.includes('<strong>Marked</strong>')) throw new Error('unexpected output');" > demo.mjs
  3. 3

    Run the conversion and verify the output

    Print the generated HTML and let the script assert that <strong>Marked</strong> is present.

    node demo.mjs
Check the official README

Growth

Growth trends · Last 30 days

37,223 Stars

Trend data is still being collected.

Development activity

Last 90 days · weekly

Commits (last 30 days)
29
Open PRs
14

Development activity is still being collected.

Built with

Categories and tags

Categories

GitHub data

GitHub dataView detailed GitHub data

GitHub Topics

  • markdown
  • compiler
  • parser
  • commonmark
  • gfm
  • hacktoberfest
Stars
37,223
Forks
3,747
Watchers
384
Open issues
12
Contributors
233
Owner type
Organization
Primary language
TypeScript
License
MIT
Repository last updated
Oct 5, 2026
Write a related article

Share a guide or use case for this OSS in Markdown. Articles are published after administrator approval.

Report incorrect information

Tell us if any listing information is incorrect or outdated.

After reading this page, do you know what to do next?