Convert HTML to Markdown (GFM). Clean conversion: headings, lists, links, images, tables, code blocks. Copy HTML from web, get GitHub-compatible Markdown.
Use this free online HTML ↔ Markdown Converter directly in your browser. No signup required, no data leaves your device. Part of Utilier — a collection of 133+ developer utilities.
What is HTML to Markdown Converter (Clean, GitHub Flavored)?
HTML is verbose (<p><strong>text</strong></p>), hard to edit manually. Markdown is clean (# heading, **bold**), easy to read/write.
Migrate content to Markdown: WordPress, Medium, Drupal content → Markdown (static site generators: Jekyll, Hugo, Gatsby). Convert HTML export to Markdown. Version control with git.
Simplify web clippings: Copy HTML from web (articles, docs) → convert to Markdown (clean, readable). Save in notes app (Obsidian, Notion), remove styling/ads/scripts.
Create GitHub README: HTML docs → Markdown for GitHub README. Convert existing HTML documentation to GitHub-compatible Markdown (tables, code blocks, task lists).
Clean CMS export: CMS export (Drupal, Joomla) = messy HTML (inline styles, empty divs). Convert to clean Markdown (remove styling, keep content). Easier to edit.
Email to Markdown: HTML emails → Markdown (plain text, no formatting). Archive emails as Markdown notes. Remove inline styles, tracking pixels, scripts.
Learn Markdown syntax: Compare HTML input with Markdown output. See conversion: <h1> → #, <strong> → **, <a> → []. Understand Markdown structure.
When to use html to markdown
Use whenever you need to convert HTML to Markdown format.
Migrating from WordPress/Medium to static site generators (Jekyll, Hugo, Gatsby).
Converting web articles to Markdown notes (Obsidian, Notion, Roam).
Creating GitHub README from HTML documentation.
Cleaning CMS export (Drupal, Joomla HTML → clean Markdown).
Converting HTML emails to plain text Markdown.
Documentation migration (HTML docs → Markdown for Docusaurus, VuePress).
Learning Markdown (see HTML → Markdown conversions).
Simplifying HTML (remove CSS, scripts, keep content).
How to use html to markdown
Paste HTML, convert to Markdown, copy result.
Paste HTML: Copy HTML from web (Ctrl+U for page source, or inspect element), CMS export, email. Paste in input area. Or upload .html file.
Table support: Converts <table> to Markdown table. Preserves rows, columns, alignment (left, center, right). Example: <th align='center'> → |:---:|.
Code block conversion: <pre><code> → ``` (fenced block), <code> → ` (inline). Detects language from class (class='language-javascript' → ```javascript).
Nested structures: Nested lists (<ul><li><ul>), nested blockquotes (> >), complex tables. Maintains hierarchy in Markdown (indentation for nested lists).
Link and image conversion: <a href='url'>text</a> → [text](url), <img src='url' alt='text'> → . Preserves URLs, alt text, titles.
Customizable output: Options: GFM vs CommonMark, fenced vs indented code blocks, clean HTML (remove styles), preserve HTML (keep certain tags like <video>).
Common use cases
WordPress to Markdown: Export WordPress post (HTML). Convert to Markdown. Use in Jekyll, Hugo, Gatsby (static site generators). Migrate blog from WordPress to Markdown-based CMS.
Web article to notes: Copy HTML from web article (inspect element, copy outer HTML). Convert to Markdown. Save in Obsidian, Notion (clean, no styling). Remove ads, tracking, scripts.
HTML docs to README: Existing HTML documentation → GitHub README.md. Convert <h1>, <ul>, <table> to Markdown. GitHub renders Markdown (# heading, | table |).
Email to Markdown: HTML email → Markdown (plain text). Remove inline styles, tracking pixels. Archive email as .md file (version control, search).
CMS export cleanup: Drupal/Joomla HTML export (messy: inline styles, empty divs). Convert to clean Markdown (no styling). Edit Markdown (easier than HTML).
Table extraction: HTML page with data table (<table>). Convert to Markdown table (| col1 | col2 |). Copy to GitHub README, documentation, Markdown editor.
Examples
HTML to Markdown conversion examples.
Headings and emphasis
<h1>Title</h1>\n<p>This is <strong>bold</strong> and <em>italic</em> text.</p>
# Title\n\nThis is **bold** and *italic* text.
<h1> → # Title. <strong> → **bold**, <em> → *italic*. <p> → paragraph (blank line after heading).
<h1>Title</h1> → # Title, <h2> → ##, <h3> → ###, up to <h6> → ######. Setext style (underline): <h1> → Title\n===, <h2> → Title\n---. Use ATX (# style, more common).
Emphasis
<strong>bold</strong> or <b>bold</b> → **bold**. <em>italic</em> or <i>italic</i> → *italic*. <del>strikethrough</del> → ~~strikethrough~~ (GFM only).
Links
<a href='https://example.com'>link</a> → [link](https://example.com). With title: <a href='url' title='title'>link</a> → [link](url 'title'). Bare URL: <a href='url'>url</a> → <url> (autolink).
Images
<img src='url' alt='alt text'> → . With title: <img src='url' alt='alt' title='title'> → . No width/height in Markdown (use HTML <img> if needed).
<blockquote>quote</blockquote> → > quote. Nested: <blockquote><blockquote> → > > nested. Multi-line: > Line 1\n> Line 2.
Line breaks
<br> → two spaces + newline ( \n) or \\ (backslash). <p>Para 1</p><p>Para 2</p> → Para 1\n\nPara 2 (blank line between paragraphs).
Horizontal rule
<hr> → --- or *** or ___ (3+ chars). Separates sections.
Common mistakes to avoid
Expecting perfect conversion of complex HTML (nested tables, custom CSS)
Why it happens: Markdown = limited features (no CSS, no custom styling, simple tables only). Complex HTML (colspan, rowspan, inline styles) doesn't map to Markdown. Conversion = best effort (may lose formatting).
How to avoid it: Simplify HTML before conversion (remove complex tables, CSS). Or keep HTML for complex elements (Markdown supports inline HTML: <details>, <video>). Tool shows warnings for unsupported features.
Forgetting to clean HTML (keeps inline styles, scripts)
Why it happens: Without cleaning, Markdown includes: <p style='color:red'>text</p> (inline styles), <script>...</script> (scripts). Markdown renderers may strip or display as text (ugly output).
How to avoid it: Enable 'Clean HTML' option (removes styles, scripts, empty tags). Or manually clean HTML before conversion (remove <style>, <script>, style='...').
Using indented code blocks (4 spaces) instead of fenced (```)
Why it happens: Indented code blocks (4 spaces) = legacy, no syntax highlighting. Fenced blocks (```) = modern, supports language (```javascript). GitHub, Obsidian prefer fenced.
How to avoid it: Use fenced code blocks: ```language\ncode\n```. Tool default: fenced (change in options if needed). Specify language for syntax highlighting.
Not previewing Markdown output (conversion errors unnoticed)
Why it happens: Conversion may have errors: broken links ([text]()), malformed tables (| col |), incorrect nesting. Without preview, errors not caught until publishing.
How to avoid it: Use preview mode (render Markdown to HTML). Check: headings correct level (#, ##), lists indented, tables formatted, links work. Fix Markdown before using.
Expecting HTML attributes in Markdown (id, class, style)
Why it happens: Markdown doesn't support HTML attributes (no id='...', class='...', style='...'). Conversion drops attributes. <h1 id='intro'> → # (id lost).
How to avoid it: If need attributes, keep HTML: <h1 id='intro'>Title</h1> (Markdown allows inline HTML). Or use Markdown extensions (some support {#id}, {.class}).
Frequently asked questions
Can I convert Markdown back to HTML?
Yes, use Markdown renderer (marked.js, markdown-it, GitHub). Markdown → HTML = common (static site generators). HTML → Markdown → HTML = lossy (formatting lost).
What happens to CSS and inline styles?
Removed by default (Markdown = no styling). Enable 'Clean HTML' to strip <style>, style='...'. Or preserve HTML (keep <span style='...'> as-is in Markdown, some renderers support it).
Does the tool support all HTML tags?
Common tags: yes (<h1>-<h6>, <p>, <a>, <img>, <ul>, <ol>, <table>, <code>, <strong>, <em>). Rare tags: <details>, <summary>, <video> → kept as HTML (Markdown doesn't have equivalent). Custom tags: removed.
What is the difference between GFM and CommonMark?
CommonMark = standard Markdown (headings, lists, links, code). GFM (GitHub Flavored Markdown) = CommonMark + tables, task lists, strikethrough, autolinks. Use GFM for GitHub README.
Can I convert HTML tables to Markdown?
Yes, simple tables (rows, columns). Complex tables (colspan, rowspan, nested tables) → best effort (may lose structure). GFM tables: | Header |. No merged cells in Markdown.
How do I preserve videos, iframes in Markdown?
Markdown supports inline HTML. Keep <video>, <iframe> as-is: <video src='...'></video>. Some renderers support it (GitHub, Docusaurus). Or use Markdown extensions ().
Why does my Markdown look different on GitHub vs Obsidian?
Different Markdown flavors: GitHub = GFM (tables, task lists), Obsidian = CommonMark + extensions (wikilinks, callouts). Test Markdown on target platform (GitHub, Obsidian, Hugo).