HTML to Markdown Converter
Paste HTML and instantly get clean Markdown output. Supports tables, lists, code blocks, links, and images.
Paste any HTML — blog posts, CMS exports, email templates — and get clean Markdown back in one click. Headings, links, tables, code blocks, images, and nested lists all convert correctly with your preferred syntax style. And everything runs in your browser. Nothing gets uploaded.
How It Works
The browser's built-in DOMParser turns your HTML string into a real document tree. Then a recursive walker visits each node — elements, text, whitespace — and converts them to the matching Markdown syntax based on your chosen options. The output is plain text you can paste straight into any Markdown file.
Examples
Blog post with headings and links
You grabbed an article from a CMS and need it for a Jekyll site.
<h2>Getting Started</h2>
<p>Read the <a href="/docs">documentation</a> first.</p>
<ul>
<li>Install Node.js</li>
<li>Run <code>npm init</code></li>
</ul>
## Getting Started
Read the [documentation](/docs) first.
- Install Node.js
- Run `npm init`
HTML table from a spreadsheet export
Pasted a pricing table from Google Sheets into an email, now you need it in a GitHub wiki.
<table>
<tr><th>Plan</th><th>Price</th></tr>
<tr><td>Free</td><td>$0</td></tr>
<tr><td>Pro</td><td>$12/mo</td></tr>
</table>
| Plan | Price |
| --- | --- |
| Free | $0 |
| Pro | $12/mo |
Code snippet with syntax highlighting markup
A tutorial site wraps code in <pre><code class="language-js"> tags. You want a clean fenced block.
<pre><code class="language-js">
const greet = (name) => {
return `Hello, ${name}!`;
};
</code></pre>
```js
const greet = (name) => {
return `Hello, ${name}!`;
};
```
Who Uses This
Converting docs, READMEs, or wiki pages pulled from HTML-based CMSes into Markdown for Git repos.
Migrating help center articles from HTML platforms like Zendesk or Confluence into Markdown-based docs sites.
Turning lecture notes saved as web pages into Markdown for Obsidian or Notion imports.
Moving WordPress or Medium posts to Hugo, Gatsby, or any static site generator that expects .md files.
Common Mistakes
Copying directly from a rendered web page gives you rich text, not HTML tags. You'll get plain text output with no formatting. Right-click the page, choose "View Page Source" or "Inspect," and copy the actual HTML.
Markdown has no concept of colors, fonts, or custom spacing. Inline styles and class names get stripped during conversion. If your formatting depends heavily on CSS, you'll need to restructure it using Markdown's limited syntax — headings, bold, italic, lists.
Different Markdown renderers expect different indent widths for nested lists (2 spaces vs. 4). The converter defaults to a standard indent, but your target platform might need adjustment. Preview the output before committing.
Technical Details
- Processing: 100% client-side — nothing is uploaded
- Parser: Native browser DOMParser API
- Heading Styles: ATX (# marks) or Setext (underline)
- Code Blocks: Fenced or indented, with language detection
- Browser Support: Chrome, Firefox, Safari, Edge
Frequently Asked Questions
Can I convert an entire web page to Markdown?
Yes, but you'll get better results if you paste just the content area — the <article> or <main> section. Full pages include nav bars, footers, and script tags that produce noisy output. Grab the part you actually want.
What's the difference between ATX and Setext headings?
ATX uses hash marks — # H1, ## H2, and so on through H6. Setext underlines the text with === for H1 and --- for H2, but it only covers two levels. Most people stick with ATX because it handles all six heading levels.
Does this handle HTML tables?
It does. Tables get converted to the pipe-and-dash format that GitHub and most Markdown renderers support. Column alignment from the HTML (left, center, right) carries over using colon markers in the separator row.
Is my HTML sent to a server?
No. The conversion happens entirely in your browser using JavaScript. Nothing gets uploaded, stored, or logged. You can verify by opening your browser's network tab — zero requests are made during conversion.
What happens to HTML tags the converter doesn't recognize?
Unknown tags are stripped, but their text content is kept. So a <custom-widget>Hello</custom-widget> becomes just "Hello" in the output. No data is lost — only the tags themselves are removed.