{
 "kind": "tool",
 "slug": "marked",
 "path": "tools/marked/",
 "name": "Marked",
 "maker": null,
 "density": "profile",
 "crumbs": [
  [
   "Tools",
   "tools/"
  ],
  [
   "Markdown, editors and content",
   "tools/content-editors/"
  ]
 ],
 "lead": "Fast, efficient markdown parser for converting markdown to HTML.",
 "chips": [
  {
   "label": "Markdown, editors and content",
   "path": "tools/content-editors/"
  },
  {
   "label": "NPM"
  }
 ],
 "primary": {
  "label": "Copy install command",
  "copy": "npm install marked"
 },
 "links": [
  {
   "label": "GitHub",
   "href": "https://github.com/markedjs/marked"
  },
  {
   "label": "Website",
   "href": "https://marked.js.org"
  }
 ],
 "track": "New versions, deprecation and license changes on your dashboard",
 "verdicts": [
  {
   "key": "license",
   "label": "License",
   "value": "MIT",
   "status": "yes",
   "sub": "Use it in paid apps",
   "quote": null,
   "note": "License from npm.",
   "src": "https://github.com/markedjs/marked"
  },
  {
   "key": "maint",
   "label": "Maintained",
   "value": "Maintained",
   "status": "yes",
   "sub": "Last change Nov 24, 2026",
   "note": "Latest GitHub release Nov 24, 2026. ",
   "src": "https://github.com/markedjs/marked"
  },
  {
   "key": "pop",
   "label": "Used by agents' projects",
   "value": "163 projects",
   "status": "info",
   "sub": "#3 of 149 in its category",
   "note": "Dependency in 163 public GitHub projects set up for AI coding agents that we scanned (2.6%).",
   "src": null
  },
  {
   "key": "agent",
   "label": "Agent access",
   "value": "Install only",
   "status": "info",
   "sub": null,
   "note": "Agent skills for this library in the skills catalog; community skills are written by others, read them before you install.",
   "src": null
  }
 ],
 "vfoot": "From the package registry and GitHub, checked daily.",
 "blocks": [
  {
   "id": "overview",
   "nav": "Overview",
   "h2": "What Marked does",
   "parts": [
    {
     "t": "prose",
     "text": "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."
    }
   ]
  },
  {
   "id": "popularity",
   "nav": "Popularity",
   "h2": "Marked popularity",
   "parts": [
    {
     "t": "stats",
     "items": [
      {
       "n": "84",
       "of": "/ 100",
       "l": "Gid Score, #50 overall"
      },
      {
       "n": "138M",
       "l": "downloads a week, npm"
      },
      {
       "n": "37.3K",
       "l": "GitHub stars"
      },
      {
       "n": "163",
       "l": "agent projects use it"
      }
     ]
    },
    {
     "t": "small",
     "text": "Gid Score measures public popularity and activity, not quality.",
     "link": "How the Gid Score is calculated",
     "path": "tools/top/"
    }
   ]
  },
  {
   "id": "usage",
   "nav": "How it is used",
   "h2": "How Marked is used",
   "parts": [
    {
     "t": "list",
     "items": [
      "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%)."
     ]
    },
    {
     "t": "h3",
     "text": "By coding agent"
    },
    {
     "t": "rows",
     "rows": [
      {
       "l": "111 projects, 3.4%",
       "v": "Claude Code",
       "path": "agents/claude-code/"
      },
      {
       "l": "83 projects, 2.7%",
       "v": "GitHub Copilot",
       "path": "agents/github-copilot/"
      },
      {
       "l": "52 projects, 2.1%",
       "v": "Cursor",
       "path": "agents/cursor/"
      },
      {
       "l": "22 projects, 4.6%",
       "v": "Gemini CLI",
       "path": "agents/gemini-cli/"
      },
      {
       "l": "16 projects, 4.7%",
       "v": "OpenCode",
       "path": "agents/opencode/"
      },
      {
       "l": "14 projects, 3.0%",
       "v": "OpenAI Codex",
       "path": "agents/openai-codex/"
      },
      {
       "l": "13 projects, 3.9%",
       "v": "OpenClaw",
       "path": "agents/openclaw/"
      },
      {
       "l": "6 projects, 4.3%",
       "v": "Kiro",
       "path": "agents/kiro/"
      }
     ]
    },
    {
     "t": "h3",
     "text": "Often used with"
    },
    {
     "t": "rows",
     "rows": [
      {
       "l": "In 87.7% of its projects",
       "v": "TypeScript",
       "path": "tools/typescript/"
      },
      {
       "l": "In 56.4% of its projects",
       "v": "Zod",
       "path": "tools/zod/"
      },
      {
       "l": "In 47.2% of its projects",
       "v": "Vitest",
       "path": "tools/vitest/"
      },
      {
       "l": "In 27.0% of its projects",
       "v": "Express",
       "path": "tools/express/"
      },
      {
       "l": "In 40.5% of its projects",
       "v": "Playwright (JavaScript)",
       "path": "tools/playwright-test/"
      },
      {
       "l": "In 29.4% of its projects",
       "v": "Model Context Protocol SDK (JavaScript)",
       "path": "tools/modelcontextprotocol/"
      },
      {
       "l": "In 22.1% of its projects",
       "v": "AWS SDK for JavaScript (S3)",
       "path": "tools/aws-sdk-client-s3/"
      },
      {
       "l": "In 20.9% of its projects",
       "v": "Anthropic SDK",
       "path": "tools/anthropic-ai/"
      }
     ]
    }
   ]
  },
  {
   "id": "profile",
   "nav": "Profile",
   "h2": "Marked in practice",
   "parts": [
    {
     "t": "h3",
     "text": "Strengths"
    },
    {
     "t": "rows",
     "rows": [
      {
       "l": "Conformance is published per section",
       "v": "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."
      },
      {
       "l": "Zero dependencies, low-level design",
       "v": "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."
      },
      {
       "l": "One library for browser, server and shell",
       "v": "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>)."
      },
      {
       "l": "CLI picks up a config file",
       "v": "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>."
      }
     ]
    },
    {
     "t": "h3",
     "text": "Watch out for"
    },
    {
     "t": "rows",
     "rows": [
      {
       "l": "Output HTML is not sanitized",
       "v": "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)."
      },
      {
       "l": "Zero-width characters can break parsing",
       "v": "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>."
      },
      {
       "l": "Some GFM sections still fail",
       "v": "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."
      }
     ]
    },
    {
     "t": "h3",
     "text": "Parse Markdown in Node.js"
    },
    {
     "t": "tabs",
     "label": "Example",
     "items": [
      {
       "tab": "Js",
       "code": "import { marked } from 'marked';\n\nconst html = marked.parse('# Marked in Node.js');\n\nconsole.log(html);"
      }
     ]
    }
   ]
  },
  {
   "id": "more",
   "nav": null,
   "spy_as": "profile",
   "h2": "More about Marked",
   "parts": [
    {
     "t": "more",
     "items": [
      {
       "title": "Head to head",
       "items": [
        {
         "text": "react-markdown vs Marked",
         "note": "used together in 31 projects",
         "path": "tools/compare/react-markdown-vs-marked/"
        },
        {
         "text": "Marked vs markdown-it",
         "note": "used together in 7 projects",
         "path": "tools/compare/marked-vs-markdown-it/"
        },
        {
         "text": "Marked vs MDX",
         "note": "used together in 10 projects",
         "path": "tools/compare/marked-vs-mdx/"
        }
       ]
      },
      {
       "title": "Packages around it",
       "items": [
        "zod: Schema validation",
        "vitest: Test runner",
        "typescript: Typed JavaScript",
        "tailwindcss: Utility-first CSS",
        "@playwright/test: End-to-end browser tests",
        "uuid: UUID generation"
       ]
      },
      {
       "title": "More in Markdown, editors and content",
       "path": "tools/content-editors/",
       "items": [
        {
         "text": "Jinja2",
         "path": "tools/jinja2/"
        },
        {
         "text": "gray-matter",
         "path": "tools/gray-matter/"
        },
        {
         "text": "Tiptap",
         "path": "tools/tiptap/"
        },
        {
         "text": "Shiki",
         "path": "tools/shiki/"
        },
        {
         "text": "highlight.js",
         "path": "tools/highlight-js/"
        },
        {
         "text": "Pygments",
         "path": "tools/pygments/"
        },
        {
         "text": "KaTeX",
         "path": "tools/katex/"
        },
        {
         "text": "React Email",
         "path": "tools/react-email-components/"
        }
       ]
      }
     ]
    }
   ]
  },
  {
   "id": "alternatives",
   "nav": "Alternatives",
   "h2": "Alternatives",
   "parts": [
    {
     "t": "alts",
     "items": [
      {
       "name": "Marked",
       "me": true,
       "facts": [
        "MIT",
        "Gid 84",
        "138M/wk"
       ]
      },
      {
       "name": "react-markdown",
       "why": "React component for rendering markdown with customizable component handling.",
       "path": "tools/react-markdown/",
       "facts": [
        "MIT",
        "Gid 83",
        "61.6M/wk"
       ]
      },
      {
       "name": "remark-gfm",
       "why": "Remark plugin adding GitHub Flavored Markdown support for tables and strikethrough.",
       "path": "tools/remark-gfm/",
       "facts": [
        "MIT",
        "Gid 71",
        "76.9M/wk"
       ]
      },
      {
       "name": "markdown-it",
       "why": "Modern pluggable markdown parser with plugin ecosystem.",
       "path": "tools/markdown-it/",
       "facts": [
        "MIT",
        "Gid 74",
        "42M/wk"
       ]
      },
      {
       "name": "MDX",
       "why": "Write JSX directly in Markdown for rich, interactive content and documentation.",
       "path": "tools/mdx-js/",
       "facts": [
        "MIT",
        "Gid 73",
        "33.8M/wk"
       ]
      }
     ],
     "more": "Compare Marked with another tool",
     "more_path": "tools/compare/"
    }
   ]
  },
  {
   "id": "start",
   "nav": "Get started",
   "h2": "Get started",
   "parts": [
    {
     "t": "install",
     "intro": "Install it.",
     "code": "npm install marked"
    },
    {
     "t": "h3",
     "text": "Rules for your agent"
    },
    {
     "t": "rules",
     "label": "Paste into AGENTS.md or CLAUDE.md",
     "text": "## Marked\n- Import with `import { marked } from 'marked'` and convert with `marked.parse(markdown)`.\n- 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(...))`.\n- Strip leading zero-width characters before parsing: `contents.replace(/^[\\u200B\\u200C\\u200D\\u200E\\u200F\\uFEFF]/, \"\")`.\n- Install extensions and renderer overrides through `marked.use(...)` rather than patching output.\n- 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.\n- Target only current and LTS Node.js versions.\n- For the CLI, put options in `~/.marked.json` or pass a file with `-c`.\n"
    }
   ]
  }
 ],
 "glance": [
  [
   "Package",
   "npm marked"
  ],
  [
   "Category",
   "Markdown, editors and content"
  ],
  [
   "License",
   "MIT"
  ],
  [
   "Latest version",
   "v18.1.0, October 5, 2026"
  ],
  [
   "On GitHub since",
   "July 2011"
  ],
  [
   "Gid Score",
   "83.5"
  ],
  [
   "Rank in category",
   "#3 of 149"
  ],
  [
   "GitHub",
   "markedjs/marked"
  ],
  [
   "Last change",
   "Nov 24, 2026"
  ]
 ],
 "good": [
  "Used by zero-md, texme, StrapDown.js, raito, as listed by the source; we have not checked each one."
 ],
 "checked_line": "From the package registry, GitHub and our scan of public agent projects; numbers update daily.",
 "logo": "https://agentgid.com/media/avatars/markedjs.png"
}