Markdown to HTML Converter
Convert Markdown to HTML with a live preview, or turn HTML into clean Markdown, including tables and code blocks.
Markdown to HTML Converter - and HTML Back to Markdown
Write or paste Markdown and see it rendered as you type, with the HTML behind it one click away. Or go the other way: paste HTML from a web page, a CMS or an email and get clean Markdown for a README, a wiki or a static site. Tables, task lists, strikethrough and fenced code blocks from GitHub Flavored Markdown work in both directions, and everything runs in your browser.
Markdown is how developers write documentation, how many note apps store text, and how GitHub, GitLab and Stack Overflow format posts. HTML is what the browser needs. Converting between them by hand is tedious and easy to get wrong.
How to use it
- Choose Markdown → HTML or HTML → Markdown.
- Type or paste your text; the result updates as you type.
- For Markdown, switch between Preview and HTML; tick Full HTML page to get a complete document.
- Press Copy or Download. Switching direction carries the result over, so you can convert back and forth.
Markdown syntax at a glance
| Markdown | Result |
|---|---|
# Title, ## Section | Headings, level 1 and 2 |
**bold**, *italic*, ~~struck~~ | Bold, italic, strikethrough |
[text](https://example.com) | A link |
 | An image |
- item or 1. item | Bulleted or numbered list |
- [x] done | A task list item |
`code` and fenced blocks with ``` | Inline code and code blocks |
| a | b | rows with a |---| line | A table |
> quote | A blockquote |
Line breaks
In standard Markdown a single line break inside a paragraph is ignored; you need an empty line to start a new paragraph, or two spaces at the end of the line for a break. Many people expect every line break to show, because that is how GitHub comments behave. Tick Keep single line breaks for that behaviour.
HTML to Markdown
Pasting HTML turns headings, paragraphs, links, images, lists, tables, blockquotes and code blocks into their Markdown equivalents. Scripts, styles and anything Markdown cannot express, such as colours or layout, are dropped, which is usually what you want when moving content into a README or a documentation site. You can choose between hash marks and underlined headings and pick the List marker.
Safety
Markdown can contain raw HTML, including scripts. The preview is shown in a sandboxed frame in which scripts cannot run and which cannot reach this page, so a pasted document cannot do anything harmful here. The HTML output is not sanitised, though: if the Markdown came from someone you do not trust, clean the HTML before publishing it on a website.
Related tools
To indent or minify the resulting HTML, use the code formatter. To count the words in your document, use the word counter. The task pages open this tool on one job: HTML to Markdown and Markdown preview.