How to convert HTML to Markdown
- Paste HTML into HTML. The Markdown updates as you type.
- Pick the Headings style and the Bullets marker your project uses.
- Copy the Markdown or download it as document.md.
What gets converted
| HTML | Markdown |
|---|---|
<h1> to <h6> |
# to ######, or underlined for h1 and h2 |
<strong> and <b> |
**bold** |
<em> and <i> |
*italic* |
<a href="..."> |
[text](url) |
<img> |
 |
<ul> and <ol> |
Bullets and numbered items |
<pre><code> |
A fenced code block, tagged with the language from a language- class |
<blockquote> |
> quote |
<hr> |
* * * |
The conversion uses turndown, an open-source HTML to Markdown library.
What doesn’t survive
- Scripts and styles. Script, style and noscript tags are removed along with their contents.
- Tables. They turn into their text, one cell per line.
- Strikethrough.
<del>and<s>lose their line and become normal text. - Layout and colours. Divs, spans, classes and inline styles are dropped. Their text is kept.
Paste only the part of the page you need, such as the article, so menus and footers don’t end up in your Markdown.