Showdown converts Markdown to HTML and HTML back to Markdown in JavaScript. It runs in browsers and on Node.js servers.
Overview
Showdown is a JavaScript library for turning Markdown into HTML and for reverse conversion from HTML to Markdown. It builds on earlier work by John Gruber and is maintained as ShowdownJS.
You can embed it in client-side pages or use it on the server with Node.js. Distribution options include npm, Bower, NuGet, CDNs, and release tarballs. The project documents broad browser and Node version expectations.
Configuration covers many Markdown flavor options, including GFM-oriented features such as tables, task lists, strikethrough, and code blocks. Flavor presets help match vanilla, GitHub-flavored, or CommonMark-oriented behavior. An optional safeMode adds defense-in-depth hardening for untrusted input, though the authors still recommend dedicated HTML sanitization for hostile content.
Extensions can add behavior beyond the core converter. A bundled command-line interface is available for conversions outside application code, with defaults that differ slightly from the library defaults.
Key features
- Markdown to HTML conversion
- HTML to Markdown conversion
- Browser and Node.js use
- GFM and flavor presets
- Configurable parser options
- Optional safeMode hardening
- Pluggable extensions
- Bundled CLI tool
Use cases
- Rendering Markdown in web apps
- Server-side Markdown processing
- GitHub-flavored Markdown output
- Batch file conversion via CLI
- Custom syntax via extensions