How to use the Markdown to HTML tool
- Add MarkdownPaste Markdown into the left box, or drop or open a .md file.
- Choose the outputPick “HTML code only” for a CMS or website, or “Complete HTML page” for a standalone file with styles.
- Check the resultThe HTML code updates as you type. Switch to Preview to see how it looks.
- Copy or downloadCopy the HTML to the clipboard or download it as an .html file.
Features
- Clean, readable codeBlock elements are placed on their own lines and indented, ready to paste into a template.
- GitHub Flavored MarkdownTables with alignment, task lists, strikethrough, fenced code blocks and automatic links.
- Safe outputScripts, event handlers and other unsafe HTML in the Markdown are removed.
- Link optionsOptionally add target="_blank" and rel="noopener" to external links.
- Complete page optionGet a full HTML document with a title and readable typography, ready to open in a browser.
When to convert Markdown to HTML
Markdown is pleasant to write, but browsers, email builders and many content management systems need HTML. Converting gives you code you can paste anywhere.
- Publishing a README or documentation page on a website
- Pasting an article written in a Markdown app into WordPress, Blogger or a newsletter tool
- Turning notes into a standalone web page to share or archive
- Checking exactly which HTML a piece of Markdown produces
What each Markdown element becomes
| Markdown | HTML |
|---|---|
# Title | <h1>Title</h1> |
**bold** | <strong>bold</strong> |
[text](url) | <a href="url">text</a> |
- item | <ul><li>item</li></ul> |
Table with | pipes | <table> with <thead> and <tbody> |
```js fence | <pre><code class="language-js"> |
Common problems and how to fix them
- A list shows as one long paragraph. Markdown needs an empty line before the first list item. Add a blank line above the list and it will be recognised.
- Line breaks disappear. A single line break inside a paragraph is treated as a space. Leave an empty line to start a new paragraph, or end a line with two spaces for a simple break.
- Stars or underscores appear in the text. Characters such as
*and_start formatting. Put a backslash in front (\*) when you want the character itself. - A table is not converted. Tables need a header row and a separator row of dashes below it, with the same number of columns in every row.
- The HTML looks plain on my site. That is expected. The converter produces clean tags without styling, so your website’s own CSS decides the fonts and colours. Choose the complete page download if you want a file that already looks good on its own.
When you paste the HTML into a CMS such as WordPress, switch the editor to its code or “Custom HTML” view first. Pasting into the visual editor shows the tags as text.
Related tools
To write and preview Markdown with a toolbar and autosave, use the Markdown Editor. To go the other way, convert web pages with HTML to Markdown.