Tools / Markdown to HTML
Markdown to HTML
Paste your Markdown and get clean, nicely formatted HTML with a live preview. Tables, task lists, and fenced code blocks all come through exactly as GitHub would render them.
Going the other way? HTML to Markdown →When you need the HTML, not the Markdown
Markdown is for writing; HTML is what browsers, email clients, and many CMS fields actually accept. This converter is for the moment the two meet: a README you want to publish on a site that only takes HTML, release notes going into an email template, a Markdown draft headed for a WYSIWYG editor that mangles pasted plain text, or a quick check of exactly what a renderer will produce from your syntax.
The converter runs in your browser with Showdown. Nothing is uploaded, so unpublished drafts and internal notes are safe to paste.
What GitHub Flavored Markdown adds
With GFM on, the converter understands the extensions most people now assume are Markdown: pipe tables, task lists with - [ ] and - [x], strikethrough with ~~text~~, fenced code blocks with a language hint, and bare URLs that turn into links. Turn it off only if the destination renderer is strict CommonMark and you want to see what will break.
| Tool | Runs in |
|:-----|--------:|
| Diff | browser |
- [x] Write
- [ ] Publish<table>
<thead>
<tr><th style="text-align:left">Tool</th><th style="text-align:right">Runs in</th></tr>
</thead>
<tbody>
<tr><td style="text-align:left">Diff</td><td style="text-align:right">browser</td></tr>
</tbody>
</table>
<ul>
<li><input type="checkbox" disabled checked> Write</li>
<li><input type="checkbox" disabled> Publish</li>
</ul>Heading ids and anchor links
The heading ids option gives every heading an id derived from its text, so ## Getting started becomes <h2 id="getting-started">. That is what makes #getting-started links and tables of contents work. Keep it on for documentation and long articles; turn it off for email, where ids are ignored and only add bytes.
How line breaks are handled
Standard Markdown joins consecutive lines into one paragraph and only starts a new paragraph after a blank line. Many people write as if a single Enter were a line break, and are surprised when it disappears. The newline option switches to that intuitive behaviour: every line break in the source becomes a <br>. Use it for poetry, addresses, and chat-style notes; leave it off for prose that you want reflowed.
Fragment or full document
By default the output is a fragment: just the elements, ready to drop into an existing page or CMS body field. The full HTML document option wraps it in a minimal page with a doctype, charset, viewport meta, and a <title> taken from your first # heading. That file opens directly in a browser and can be uploaded to any static host as-is. Either way, copy the result to the clipboard or download it as a .html file.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Getting started</title>
</head>
<body>
<h1 id="getting-started">Getting started</h1>
...
</body>
</html>The preview and what it protects you from
Switch the output pane between the generated code and a rendered preview. The preview lives in a sandboxed iframe, so a stray <script> in the Markdown cannot run on this page. The HTML you copy is unmodified, though, so if the source came from someone else, review it before publishing it anywhere that trusts it.
Tips for common destinations
- Email: most clients ignore
<style>blocks, so expect unstyled but correctly structured content. Keep tables simple. - CMS body fields: paste the fragment, not the full document, or you will nest a page inside a page.
- Code samples: the language hint on a fence becomes a
classon the<code>element, which syntax highlighters such as highlight.js and Prism pick up. - Coming from a web page instead of Markdown? Run it through HTML to Markdown first to clean it, then back through this tool to get tidy HTML.
FAQ
Does the conversion run in my browser?
Yes. Showdown runs entirely in your browser, so your Markdown is never uploaded. Private notes and unpublished drafts are safe to paste.
Which Markdown syntax is supported?
CommonMark basics plus GitHub Flavored Markdown when GFM is on: tables, strikethrough, task lists, fenced code blocks with language hints, and auto-linked URLs.
What does full HTML document do?
Wraps the fragment in a minimal <!DOCTYPE html> page with a charset, viewport, and a <title> taken from your first # heading, ready to open in a browser or drop on a server.
Is the preview safe?
The preview renders in a fully sandboxed iframe, so any raw <script> in your Markdown cannot run on this page. The HTML you copy is unmodified, so review it before publishing untrusted content.