Marked
Fast, full-featured Markdown parser and compiler for browser and Node.js. Marked converts Markdown text to HTML. One of the fastest Markdown parsers — used in Ghost, readme.io, and many documentation tools. Supports CommonMark, GitHub Flavored Markdown (GFM), and custom extensions via marked.use(). Works synchronously or asynchronously.
Score Breakdown
⚙ Agent Friendliness
🔒 Security
WARNING: Marked does not sanitize HTML output. ALWAYS sanitize with DOMPurify/sanitize-html when rendering user-provided content. XSS via Markdown is a real attack vector.
⚡ Reliability
Best When
You need fast Markdown-to-HTML conversion with minimal setup and broad syntax support — Marked is the go-to for straightforward rendering.
Avoid When
You need AST-level Markdown processing (use remark), MDX support, or complex plugin pipelines — unified/remark ecosystem is more powerful for complex transforms.
Use Cases
- • Convert Markdown content to HTML in agent documentation generators, content management systems, and static site generators
- • Render user-provided Markdown content in web applications (blog posts, comments, documentation)
- • Add GitHub Flavored Markdown (tables, task lists, strikethrough) to content rendering pipelines
- • Build custom Markdown extensions with marked.use() for agent-specific markup (callouts, diagrams, widgets)
- • Process Markdown in Node.js pipelines for email generation, PDF rendering, or content transformation
Not For
- • Complex Markdown AST manipulation — use remark for AST-level processing
- • MDX (Markdown + JSX) — use the mdx package for React component embedding in Markdown
- • Source-level Markdown editing — Marked is a renderer, not an editor
Interface
Authentication
No authentication — local Markdown parsing library.
Pricing
MIT-licensed open source library.
Agent Metadata
Known Gotchas
- ⚠ Marked does NOT sanitize HTML output — rendering user-provided Markdown without sanitization is an XSS vulnerability; use DOMPurify or sanitize-html on the output
- ⚠ Marked v9 changed to async-first API — marked() may return Promise in some configurations; always use await marked.parse() for consistent behavior
- ⚠ GFM tables require 3+ dashes in separator row — malformed tables render as plain text without error; validate Markdown table syntax before relying on table rendering
- ⚠ Marked extensions hook into the lexer/parser — complex extensions require understanding tokenization flow; incorrect extension hooks silently break rendering
- ⚠ HTML passthrough is enabled by default — HTML in Markdown source is included in output; this is intentional but requires sanitization for user content
- ⚠ Line ending normalization — Marked normalizes line endings but Windows CRLF in Markdown may cause unexpected paragraph breaks; normalize before processing
Alternatives
Full Evaluation Report
Detailed scoring breakdown, competitive positioning, security analysis, and improvement recommendations for Marked.
Scores are editorial opinions as of 2026-03-06.