Skip to content
PithLab

↑↓ to move · Enter to open · Esc to close

HTML to Markdown Converter

Turn HTML into clean, readable Markdown.

About the HTML to Markdown

Convert HTML into clean Markdown with headings, lists, links, code blocks and pipe tables. Choose heading, list and emphasis styles; scripts and styles are removed.

How to use the HTML to Markdown

  1. Paste HTML, such as a page's source or a snippet copied from a CMS.
  2. Pick heading style, bullet marker, code block style and emphasis markers to match your Markdown flavour.
  3. Leave Convert tables on to turn simple tables into pipe tables. Complex tables stay as HTML.
  4. The Markdown updates as you type. Copy it or download it as a .md file.

Examples

Headings, emphasis, links and a list

Input

<h1>Release notes</h1><p>Version <strong>2.0</strong> is <em>out</em>. See the <a href="https://example.com/docs">docs</a>.</p><ul><li>Faster</li><li>Smaller</li></ul>

Output

# Release notes

Version **2.0** is _out_. See the [docs](https://example.com/docs).

- Faster
- Smaller
A simple table becomes a pipe table

Input

<table><thead><tr><th>Plan</th><th align="right">Price</th></tr></thead><tbody><tr><td>Free</td><td>$0</td></tr><tr><td>Pro</td><td>$9</td></tr></tbody></table>

Output

| Plan | Price |
| --- | ---: |
| Free | $0 |
| Pro | $9 |
Code blocks keep their language, scripts are dropped

Input

<pre><code class="language-python">print("hi")</code></pre><script>track()</script>

Output

```python
print("hi")
```

Frequently asked questions

Which tables are converted?

Tables without merged cells (colspan or rowspan), nested tables or block content such as lists inside cells become pipe tables. The first row is used as the header and right, left or center alignment is kept. Other tables are kept as HTML, which most Markdown renderers accept.

What gets removed?

Scripts, styles, iframes, embedded objects, SVG, canvas, buttons and select boxes are removed before converting. Tables kept as HTML have event handler attributes and javascript: links stripped.

Why are some characters escaped with a backslash?

Characters like *, _ and # at the start of a line would otherwise turn into Markdown formatting. They are escaped so the text looks the same as in the HTML. Pipes inside table cells are escaped too.

Does it support GitHub Flavored Markdown?

Partly. Pipe tables, strikethrough (del and s tags become ~~text~~), task list checkboxes and fenced code blocks with a language are supported.

Is my HTML uploaded?

No. The HTML is parsed by your own browser and converted with the open source Turndown library. Nothing is sent to a server, and images and scripts in it are never loaded or run.