A Markdown parser and compiler, built for speed
open sourceMITfree
Marked is a fast, low-level Markdown parser and compiler for JavaScript that turns Markdown into HTML in the browser, on a server or from its command line tool. It implements the original Markdown, CommonMark and GitHub Flavored Markdown, parses without caching or blocking for long, and can be extended with custom extensions, renderers, tokenizers and hooks. It doesn't sanitize its output, so HTML from untrusted Markdown needs a sanitizer such as DOMPurify.
Problems it solves
- fast Markdown to HTML parser for JavaScript in the browser or Node.js
- convert a Markdown file to HTML from the command line
- render GitHub Flavored Markdown to HTML in JavaScript
- extend a Markdown parser with my own syntax
- parse large Markdown documents quickly without blocking
Features
- Markdown, CommonMark and GitHub Flavored Markdown
- browser, Node.js and CLI
- custom extensions, renderers, tokenizers and hooks
- low-level lexer and parser access
Limitations
- Doesn't sanitize the HTML it outputs: run the output through a sanitizer such as DOMPurify before showing untrusted Markdown1
Capabilities
| Has a command line tool | plan not known |
|---|---|
| Takes plugins | plan not known |
Alternatives
The same job
These do what Marked does.
- markdown-it Markdown parser done right: fast and easy to extend
- react-markdown React component to render Markdown
- markdown-to-jsx A fast, versatile Markdown toolchain for React and more
