Newsletter
Join the Community
Subscribe to our newsletter for the latest news and updates
A bidirectional Markdown to HTML to Markdown converter written in Javascript
Showdown is a free, open-source JavaScript library that converts Markdown text into HTML in both browsers and Node.js, built on John Gruber's original Markdown syntax.
Showdown is a JavaScript Markdown-to-HTML converter that runs client-side in the browser or server-side with Node.js. It takes Markdown text as input and produces HTML fragments or full HTML documents as output. The library is released under the MIT license since v2.0 (earlier versions under BSD) and is maintained by the showdownjs community led by Andre Pena (tivie). It is based on the original Markdown implementation by John Gruber.
tables, tasklists, emoji, strikethrough, ghMentions, simpleLineBreaks, parseImgDimensions, and headerIds to control output behavior.safeMode blocks dangerous URL schemes like javascript: and vbscript:, and escapes raw HTML tags/event handlers; disallowRawHTML applies GFM's disallowed raw HTML tagfilter.««« and »»» or --- lines, accessible via getMetadata().makeHtml on each keystroke to render a preview pane.safeMode and running output through DOMPurify..md files to .html files in bulk.Showdown's core API is a Converter object. You create a new converter (optionally passing options or extensions), then call converter.makeHtml(markdownText) to get an HTML string. Options can be set globally with showdown.setOption or per-instance via the constructor or setOption. Flavors are applied similarly with setFlavor.
Example in Node.js:
var showdown = require('showdown');
var converter = new showdown.Converter();
var html = converter.makeHtml('# hello, markdown!');
// html: <h1 id="hello-markdown">hello, markdown!</h1>Showdown is free and open-source software. It is released under the MIT license from v2.0 onward and remains free forever; earlier versions are under BSD. The project accepts donations via PayPal but there are no paid tiers or premium features.
Yes. Showdown is free, open-source, and will remain free forever. Versions 2.0 and later are released under the MIT license; older versions use the BSD license. You can donate via PayPal to support development.
Include the showdown.min.js file from a CDN like jsDelivr, cdnjs, or unpkg, then instantiate a new showdown.Converter() and call makeHtml with your Markdown string. No build step is required — it works in browsers supporting ECMA 262 3rd Edition.
Yes. You can set the gfm flavor globally or per-converter to enable GFM features such as tables, tasklists, strikethrough, and simplified autolinks. A github alias is available for backward compatibility.
safeMode is an opt-in security option added in v3.0.0. It blocks dangerous URL schemes like javascript: and vbscript: in links and images, escapes raw HTML tags, and strips inline event handlers such as onerror and onload. It is defense-in-depth only, not a full HTML sanitizer.
No. By default, Showdown does not sanitize input, which can allow XSS if you feed it untrusted Markdown. The README recommends enabling safeMode, running the output through a dedicated sanitizer like DOMPurify, and serving a Content-Security-Policy.
