Baike.dev
All toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
M

marked

> 编程语言
Open source

A markdown parser and compiler. Built for speed.

37.0K stars0 likes2 views
WebsiteGitHub

About

A markdown parser and compiler. Built for speed.

Marked

  • ⚡ 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
  • 🛠️ easily adaptable with custom extensions
  • 🌐 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:

  • Options
  • Extensibility

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:

bash
npm install -g marked

In-browser:

bash
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(``));

CLI

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

Node.js

javascript
import { marked } from 'marked';
const html = marked.parse('# Marked in Node.js');
console.log(html);

Browser

xml
<!doctype html>
<html>
<head>
  <meta charset="utf-8"/>
  <title>Marked in the browser</title>
</head>
<body>
  

  <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

xml
<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)

Issues· 18 open

View all issuesOpen on GitHub
  • #4085

    Improve table render

    works as intendedUpdated Sep 5, 2026
  • #4050

    CommonMark spec gaps grouped by root cause, and a question about lookup tables

    Updated Sep 4, 2026
  • #3974

    Enhancement: add TypeScript generics support for custom renderer return types

    proposalUpdated May 16, 2026
  • #3844

    let walkTokens replace the current token with multiple

    proposalUpdated Dec 13, 2025
  • #3590

    Select Extension priority

    proposalUpdated Jan 18, 2025
  • #3435

    Support custom extensions "interrupting" built-in tokens

    proposalUpdated Sep 7, 2024
  • #2355

    Measured performance decrease between major releases of Marked, time for a performance pass?

    proposalUpdated Mar 1, 2022
  • #1225

    Markdown flavors + options

    proposalparser: GFMparser: CommonMarkUpdated Apr 18, 2018

> Tags

JavaScriptcommonmarkcompilergfmhacktoberfest

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言