Markdown to HTML: Write Plain Text, Publish a Web Page
Markdown is a way of writing formatted text using ordinary characters. A # at the start of a line makes a heading, asterisks make bold or italic text, and a dash starts a list. The file stays readable as plain text, which is why it is used for README files, documentation, notes and blog drafts. Browsers do not understand Markdown, though, so it has to be turned into HTML before it can be shown on a web page. This converter does that as you type, and also goes the other way.
Everything runs in your browser. Your text is not uploaded, and the preview is rendered in a sandboxed frame, so scripts in pasted HTML do not run.
Why Convert Markdown to HTML
Most places that publish content want HTML in the end. Common reasons to convert:
- Pasting formatted content into a CMS or a page builder that has an HTML or code view.
- Writing an email or newsletter body in Markdown, then pasting the HTML into your email tool.
- Building a static site by hand without a generator.
- Turning a project README into a standalone web page you can host or attach.
The Download button saves a complete HTML document with a doctype, a character set and a title taken from your first heading, so the file opens correctly on its own.
GitHub Flavored Markdown Extras
Original Markdown has no tables, no strikethrough and no checkboxes. GitHub Flavored Markdown (GFM) adds them, and most modern tools support it. With the option switched on, you can write pipe tables, cross out text with ~~double tildes~~, and make task lists with - [x] and - [ ]. Switch it off if the system you publish to follows the older rules. The separate line break option turns a single newline inside a paragraph into a <br> tag, which matches how GitHub renders comments.
Converting HTML Back to Markdown
The reverse direction is useful when content already lives on the web. You can move old documentation into a Markdown-based docs site, clean up an HTML export from a CMS, or paste a section of a web page into a notes app that stores Markdown. Paste the HTML, and headings, links, lists, images and code blocks come out as Markdown, using # headings, fenced code blocks and - list markers. Switching direction moves the current output into the input, so you can check that a round trip keeps your content intact.
HTML can express more than Markdown can. Styles, classes, scripts and complex layouts are dropped or simplified, so review the result before you rely on it.
Markdown Syntax Cheat Sheet
| Element | Markdown | HTML output |
|---|---|---|
| Heading | ## Title | <h2>Title</h2> |
| Bold | **bold** | <strong>bold</strong> |
| Italic | *italic* | <em>italic</em> |
| Link | [text](https://example.com) | <a href="https://example.com">text</a> |
| Image |  | <img src="image.png" alt="alt"> |
| List | - item | <ul><li>item</li></ul> |
| Code | `code` | <code>code</code> |
| Blockquote | > quote | <blockquote><p>quote</p></blockquote> |
| Table (GFM) | | A | B | | <table><thead><tr><th>A</th>... |
| Horizontal rule | --- | <hr> |
Before You Publish
The converter passes raw HTML written inside Markdown straight through, as the Markdown spec allows. If the text comes from someone you do not trust, sanitize the HTML on your own site before showing it to visitors.