- built for speed.*
- a low-level markdown 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.***
* Still working on metrics for comparative analysis and definition.
** As few dependencies as possible.
*** Strict compliance could result in slower processing when running comparative benchmarking.
Checkout the demo page to see marked in action ⛹️
These documentation pages are also rendered using marked 💯
npm install -g marked
npm install marked
Warning: 🚨 Marked does not sanitize the output HTML. Please use a sanitize library, like DOMPurify (recommended), sanitize-html or insane on the output HTML! 🚨
$ marked -o hello.html hello world ^D $ cat hello.html <p>hello world</p>
$ marked -s "*hello world*" <p><em>hello world</em></p>
<html> <head> <meta charset="utf-8"/> <title>Marked in the browser</title> </head> <body> <div id="content"></div> <script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script> <script> document.getElementById('content').innerHTML = marked('# Marked in browser\n\nRendered by **marked**.'); </script> </body> </html>
const marked = require("marked"); const html = marked('# Marked in Node.js\n\nRendered by **marked**.');
Supported Markdown specifications
We actively support the features of the following Markdown flavors.
|The original markdown.pl||--|
|CommonMark||0.29||Work in progress|
|GitHub Flavored Markdown||0.29||Work in progress|
By supporting the above Markdown flavors, it's possible that Marked can help you use other flavors as well; however, these are not actively supported by the community.
The only completely secure system is the one that doesn't exist in the first place. Having said that, we take the security of Marked very seriously.
Therefore, please disclose potential security issues by email to the project committers as well as the listed owners within NPM. We will provide an initial assessment of security reports within 48 hours and should apply patches within 2 weeks (also, feel free to contribute a fix for the issue).