HTML to Markdown Converter
Converts HTML into GitHub Flavored Markdown: headings, nested and numbered lists, task lists, tables with alignment, links, images and fenced code blocks with their language.
- Runs in your browser
- Nothing uploaded
- Free, no sign-up
How to Use HTML to Markdown Converter
- Paste HTML from a page, a CMS editor or an email, or open an .html file.
- Pick a style for headings, bullets, italic and bold, code blocks and links.
- Check the notes under the result. They list anything Markdown cannot show, such as merged table cells.
- Copy the Markdown or download it as a .md file.
Example: a recipe page with a list, a table and code
The Sample button loads this HTML:
<h1>Cold brew at home</h1>
<p>Cold brew is <em>smooth</em> and <strong>low in acid</strong>. See the <a href="https://example.com/ratio" title="Ratio guide">ratio guide</a>.</p>
<h2>You need</h2>
<ul>
<li>100 g coarse coffee</li>
<li>1 litre of water
<ul><li>filtered is best</li></ul>
</li>
</ul>
<ol start="1"><li>Mix and cover.</li><li>Wait <b>16 hours</b>.</li><li>Strain twice.</li></ol>
<blockquote><p>Dilute 1:1 with milk or water.</p></blockquote>
<pre><code class="language-python">ratio = water_g / coffee_g # 10.0
</code></pre>
<table><thead><tr><th>Grind</th><th align="right">Hours</th></tr></thead><tbody><tr><td>Coarse</td><td align="right">16</td></tr><tr><td>Medium</td><td align="right">12</td></tr></tbody></table>
<p><img src="/img/jar.jpg" alt="Cold brew jar"> Use <code>H2O</code> at room temperature.</p>
The tool returns:
# Cold brew at home
Cold brew is _smooth_ and **low in acid**. See the [ratio guide](https://example.com/ratio "Ratio guide").
## You need
- 100 g coarse coffee
- 1 litre of water
- filtered is best
1. Mix and cover.
2. Wait **16 hours**.
3. Strain twice.
> Dilute 1:1 with milk or water.
```python
ratio = water_g / coffee_g # 10.0
```
| Grind | Hours |
| ------ | ----: |
| Coarse | 16 |
| Medium | 12 |
 Use `H2O` at room temperature.
The nested list keeps its indent and class="language-python" becomes the python label on the code fence. The align="right" column turns into ----:. The link title is kept in quotes. The status line reads 2 headings · 1 link · 1 image · 3 lists · 1 table · 1 code block · 26 lines of Markdown.
HTML to Markdown cheat sheet
Each row is the tool’s output with the default style: ATX headings, dash bullets, _italic_, **bold** and fenced code.
| HTML | Markdown |
|---|---|
<h2>Heading</h2> |
## Heading |
<strong>bold</strong> |
**bold** |
<em>italic</em> |
_italic_ |
<del>removed</del> |
~~removed~~ |
<code>inline code</code> |
`inline code` |
<a href="https://example.com" title="Site">link</a> |
[link](https://example.com "Site") |
<img src="cat.png" alt="A cat"> |
 |
<ul><li>one</li><li>two</li></ul> |
- one |
<ol start="3"><li>three</li><li>four</li></ol> |
3. three |
<ul><li><input type="checkbox" checked> done</li></ul> |
- [x] done |
<blockquote>quote</blockquote> |
> quote |
<pre><code class="language-js">let a = 1;</code></pre> |
```js |
<hr> |
--- |
line<br>break |
line\ |
<table><tr><th>A</th><th align="right">B</th></tr><tr><td>1</td><td>2</td></tr></table> |
| A | B | |
<sup>2</sup> |
<sup>2</sup> |
How it works
- Your HTML is read with the browser’s parser in an inactive document, so scripts never run and images never load. The tool then walks the elements and writes Markdown for each one.
- Characters that mean something in Markdown are escaped in ordinary text. A literal
*,[or a line that starts with#or1.gets a backslash, so it does not turn into formatting by accident. An_inside a word such assnake_caseis left alone, because GitHub does not treat it as italic. - Inline code and code fences are made one backtick longer than any run of backticks inside them, so code that contains backticks still works.
- The tests convert sample pages to Markdown, render that Markdown back to HTML with the marked library (GitHub Flavored Markdown), and check that the text and the element counts match.
Limits
- Markdown tables hold one line per cell. Lists, code blocks and line breaks inside a cell are flattened, and merged cells (colspan, rowspan) cannot be shown. The notes say when that happened.
- Elements with no Markdown form, such as video, iframe and details, are kept as HTML by default. GitHub shows most of them, but some apps remove iframes.
- Styling that comes from CSS classes, such as a bold class on a span, is not visible in the HTML itself, so it is not carried over.
- Line breaks inside a paragraph are written as a backslash at the end of the line. Some older Markdown tools only understand two trailing spaces.
Frequently asked questions
Does it produce GitHub Flavored Markdown?
Yes. Tables, strikethrough with ~~, task lists with [x] and fenced code blocks with a language label all follow the GitHub Flavored Markdown spec. Plain CommonMark tools show everything except the tables and task lists.
How are HTML tables converted?
The first row becomes the header row and text-align or align settings become the colons in the separator row. Pipes inside cells are escaped as \|. Columns are padded so the table is readable as plain text too.
Can I convert a whole web page?
Yes. Paste the full source and the head, scripts, styles and comments are dropped. Navigation menus and footers come through as lists and paragraphs, so you may want to paste only the article part.
What are reference-style links?
Instead of putting each address inline, the text says [link text][1] and all addresses are listed at the bottom as [1]: https://… This keeps long paragraphs readable. Choose it under Links.
Related Tools
Markdown to HTML Converter →
Convert Markdown into clean HTML, keeping headings, lists, links, and inline formatting.
Convert CSV to Markdown Table →
Convert CSV to GitHub-flavored Markdown table with per-column alignment, HTML preview, delimiter auto-detect. Free,…
Markdown Escape Tool →
Escape Markdown special characters so symbols show literally instead of becoming formatting.
Markdown Link Checker →
Extract and check the links in a Markdown document, flagging empty or malformed URLs.
Markdown Preview →
Write Markdown and see it rendered live next to your text as you type.
Markdown Table of Contents Generator →
Generate a linked table of contents from the headings in a Markdown document.
Convert Markdown to PDF →
Write or paste Markdown, see the formatted page as you type, and save it…
BBCode to HTML Converter →
Generate standard semantic HTML arrays translating classic forum BBCode syntax cleanly explicitly mappings independently…
Convert Excel to HTML Table →
Convert .xlsx, .xls, or .csv to clean HTML table - headers, borders, striped rows,…
HTML Beautifier →
Paste HTML to format it with clean indentation or to minify it into fewer…
HTML Editor with Live Preview →
Write HTML and see it render live next to your code, then copy your…
HTML Entity Encode Decode →
Decodes named, decimal and hex HTML entities into plain UTF-8 text, or encodes text…