Skip to content
Agents tracked: 506 Releases (7d): 634 Agent status: 4 with issuesSince last limit reset: Claude 15d · Codex 0d For AI agents: Markdown Updated Nov 26, 2026

Marked

Fast, efficient markdown parser for converting markdown to HTML.

Markdown, editors and contentNPM

GitHubWebsite

1. License

License from npm.

github.com/markedjs/marked

From the package registry and GitHub, checked daily. Tap a verdict to see its source.How we checkedReport an error

What Marked does

Marked is a zero-dependency Markdown compiler that publishes its pass rate for every section of the specs it follows, but it does not sanitize its HTML output, so making that output safe is up to you.

Marked popularity

84 / 100
Gid Score, #50 overall
138M
downloads a week, npm
37.3K
GitHub stars
163
agent projects use it
Marked: downloads per weeknpm, marked 138,182,475
Marked: GitHub starsmarkedjs/marked 37,323

Gid Score measures public popularity and activity, not quality. How the Gid Score is calculated

How Marked is used

  • Marked is a dependency in 163 of the 6,258 public GitHub projects set up for AI coding agents that we scanned (3.3% of the 4,867 JavaScript/TypeScript ones), #3 of 149 in markdown, editors and content.
  • Counting the projects our scan samples by dependency (Solana 3,067, Ethereum and EVM 1,774, 3D and games 3,130, agent frameworks and SDKs 13,750), it appears in 550; those are left out of every share on this page.
  • The most used alternative in our scan is react-markdown (248 projects).
  • Projects that use it most often also use TypeScript (87.7%), Zod (56.4%), Vitest (47.2%).

By coding agent

111 projects, 3.4%
83 projects, 2.7%
52 projects, 2.1%
22 projects, 4.6%
16 projects, 4.7%
14 projects, 3.0%
13 projects, 3.9%
6 projects, 4.3%

Often used with

In 87.7% of its projects
In 56.4% of its projects
In 47.2% of its projects
In 27.0% of its projects
In 40.5% of its projects
In 22.1% of its projects
In 20.9% of its projects

Marked in practice

Strengths

Conformance is published per section

The site lists pass counts for each section of Markdown 1.0, CommonMark 0.31 and GFM 0.29. Overall it reports 100% for Markdown 1.0 and CommonMark 0.31, and 99% for GFM. You can see which sections fall short instead of trusting a single headline claim.

Zero dependencies, low-level design

The docs describe Marked as a compiler that parses "without caching or blocking for long periods of time". In a footnote they list it as having zero dependencies.

One library for browser, server and shell

The same package covers an import in Node.js, a CDN script tag in the browser, and a global <code>marked</code> command. The CLI reads from stdin, a string (<code>-s</code>) or a file (<code>-i</code>).

CLI picks up a config file

The CLI can read a <code>.json</code> options object, or a <code>.js</code> file that can install extensions via <code>marked.use</code>. By default it checks <code>~/.marked.json</code>, then <code>~/.marked.js</code>, then <code>~/.marked/index.js</code>.

Watch out for

Output HTML is not sanitized

Marked passes raw HTML through. The docs say that for potentially unsafe strings you must filter the output for XSS, and they recommend DOMPurify (with js-xss, sanitize-html and insane as alternatives).

Zero-width characters can break parsing

Characters such as <code>\uFEFF</code> at the start of a file can interfere with parsing. The docs suggest stripping them with a regex before calling <code>marked.parse</code>.

Some GFM sections still fail

The GFM table shows Autolinks at 15 of 19 and the Disallowed Raw HTML extension at 0 of 1. Entity and numeric character references pass 15 of 17 in both CommonMark and GFM. Other Markdown flavors may work but are not actively supported.

Parse Markdown in Node.js

import { marked } from 'marked';

const html = marked.parse('# Marked in Node.js');

console.log(html);

More about Marked

Head to head
Packages around it
  • zod: Schema validation
  • vitest: Test runner
  • typescript: Typed JavaScript
  • tailwindcss: Utility-first CSS
  • @playwright/test: End-to-end browser tests
  • uuid: UUID generation
More in Markdown, editors and content

Alternatives

Marked This page

MITGid 84138M/wk

react-markdown

React component for rendering markdown with customizable component handling.

MITGid 8361.6M/wk

remark-gfm

Remark plugin adding GitHub Flavored Markdown support for tables and strikethrough.

MITGid 7176.9M/wk

markdown-it

Modern pluggable markdown parser with plugin ecosystem.

MITGid 7442M/wk

MDX

Write JSX directly in Markdown for rich, interactive content and documentation.

MITGid 7333.8M/wk

Compare Marked with another tool

Get started

Install it.

npm install marked

Rules for your agent

Paste into AGENTS.md or CLAUDE.md
## Marked
- Import with `import { marked } from 'marked'` and convert with `marked.parse(markdown)`.
- Never insert Marked output into the DOM unsanitized when the input could be untrusted. Pass it through a sanitizer such as `DOMPurify.sanitize(marked.parse(...))`.
- Strip leading zero-width characters before parsing: `contents.replace(/^[\u200B\u200C\u200D\u200E\u200F\uFEFF]/, "")`.
- Install extensions and renderer overrides through `marked.use(...)` rather than patching output.
- In the browser without a bundler, load `https://cdn.jsdelivr.net/npm/marked/lib/marked.umd.js` or import `marked.esm.js` as a module.
- Target only current and LTS Node.js versions.
- For the CLI, put options in `~/.marked.json` or pass a file with `-c`.