Convert Markdown to HTML and HTML back to Markdown in the browser or Node.js
open sourceMITfree
Showdown is a JavaScript library that converts Markdown to HTML and HTML back to Markdown, in the browser or in Node.js, based on John Gruber's original Markdown. Options turn on GitHub-flavoured features, CommonMark compliance and opt-in hardening such as a safe mode that escapes raw HTML, and extensions add new syntax. It ships a command-line tool too. Versions from 2.0 are MIT-licensed; earlier ones were BSD.
Problems it solves
- render Markdown to HTML in the browser with JavaScript
- turn HTML back into Markdown in a Node.js script
- convert Markdown files to HTML from the command line
Features
- Markdown to HTML and HTML to Markdown conversion
- runs in the browser and in Node.js
- GitHub-flavoured Markdown and CommonMark options
- extensions for custom syntax
- command-line tool
Limitations
- It doesn't sanitize its output by default, so untrusted Markdown needs a separate HTML sanitizer to prevent XSS.1
Alternatives
The same job
These do what Showdown does.
- Marked A Markdown parser and compiler, built for speed
- markdown-it Markdown parser done right: fast and easy to extend
- markdown-to-jsx A fast, versatile Markdown toolchain for React and more
