HTML to Markdown

Paste HTML to convert it to clean Markdown. Supports headings, lists, links, images, code blocks, tables, and blockquotes.

HTML Input

Markdown Output

# Welcome to StackUtils This is a **free** HTML to Markdown converter. It supports: - Headings (h1–h6) - *Italic* and **bold** text - [Links](https://stackutils.dev) > Use Markdown for cleaner, more portable documents. ``` const greeting = "Hello, World!"; ```

Frequently Asked Questions

What HTML elements are converted?

Headings (h1–h6), paragraphs, bold, italic, links, images, unordered and ordered lists, inline code, code blocks, blockquotes, horizontal rules, and tables.

Is my HTML processed on your servers?

No. All conversion happens in your browser using JavaScript. Your HTML is never sent to our servers.

Why use Markdown instead of HTML?

Markdown is more readable as plain text, easier to write by hand, version-control friendly, and widely supported in documentation tools like GitHub, Notion, and Obsidian.

Will the output be perfect for complex HTML?

For standard document HTML, yes. Complex layouts with nested tables, CSS-styled elements, or heavily nested structures may not convert perfectly — manual cleanup may be needed.

Why Convert HTML to Markdown?

HTML is verbose and hard to read in its raw form. Markdown is designed for humans: it is clean, version-control-friendly, and supported natively by GitHub, GitLab, Notion, Obsidian, Ghost, and most modern documentation platforms. Converting HTML to Markdown is useful when:

  • Migrating content from a legacy CMS (e.g. Drupal/WordPress) to a headless or Markdown-based CMS.
  • Saving web pages as readable Markdown notes in Obsidian or Notion.
  • Converting email newsletter HTML into a Markdown blog post draft.
  • Extracting documentation from an HTML page into a README.

HTML → Markdown Element Mapping

HTMLMarkdown
<h1>Title</h1># Title
<h2>Subtitle</h2>## Subtitle
<strong>Bold</strong>**Bold**
<em>Italic</em>*Italic*
<a href="...">Link</a>[Link](...)
<img src="a.png" alt="X">![X](a.png)
<ul><li>Item</li></ul>- Item
<ol><li>Step</li></ol>1. Step
<code>val</code>`val`
<pre><code>block</code></pre>```\nblock\n```
<blockquote>Quote</blockquote>> Quote
<hr />---

Conversion Limitations

Markdown is a document format, not a layout format. The following HTML patterns have no Markdown equivalent and will be simplified or stripped:

  • Inline CSS styles and class attributes.
  • Complex tables with merged cells (colspan, rowspan).
  • Forms, iframes, scripts, and interactive elements.
  • Multi-level nested lists beyond two levels (may lose indentation).