Skip to main content

HTML to Markdown Converter

Paste HTML, get clean Markdown. Perfect for escaping a WYSIWYG editor or migrating into a docs-as-code workflow.

Turn HTML source into editable Markdown

The HTML-to-Markdown converter turns common semantic HTML into readable, diffable Markdown you can commit to Git, edit in a text editor, or move between platforms. It handles headings, paragraphs, lists, simple tables, blockquotes, code, links, images, and inline emphasis.

Conversion runs in your browser, so mdkit does not upload the HTML to a conversion server. This can be useful for internal CMS exports, knowledge-base migrations, and other documents you do not want to submit to an online conversion API.

The output is GitHub Flavored Markdown: GFM tables, fenced code blocks, task lists, and autolinks. You can paste it directly into a docs repo, a static site generator, or any modern Markdown editor.

HTML-to-Markdown example

Semantic headings, emphasis, and links map cleanly to their Markdown equivalents.

Input
<h2>Setup</h2>
<p>Read the <strong>guide</strong> before you <a href="/start">begin</a>.</p>
Output
## Setup

Read the **guide** before you [begin](/start).

How to use the HTML to Markdown Converter

  1. 1

    Paste your HTML

    Paste the HTML — from View Source, a CMS export, a pasted-rich-text clipboard, or anywhere else — into the left panel.

  2. 2

    Review the Markdown

    The right panel shows the converted Markdown. Check that headings, lists, and tables came through correctly.

  3. 3

    Copy and review

    Copy the Markdown into your editor or repository, then review complex tables, embeds, links, and images.

Limits to know before you publish

  • CSS, page layout, forms, scripts, and most element attributes have no Markdown equivalent and are not preserved.
  • Tables with merged cells, nested blocks, or multiple paragraphs usually need manual cleanup.
  • Review relative links and image paths after moving content between sites.

Common use cases

  • Migrating blog posts from a WordPress, Medium, or Ghost export into a Git-based docs workflow
  • Converting Notion or Confluence HTML exports into plain Markdown notes
  • Recovering documentation from a rendered web page when the original source is lost
  • Cleaning up copy-pasted rich text that brought along bloated inline formatting

Frequently Asked Questions

What happens to inline styles and scripts?+
Markdown has no direct representation for CSS, layout, or JavaScript. Treat those features as unsupported and inspect the output before publishing.
Will complex HTML tables convert cleanly?+
Simple tables convert to GFM tables. Tables with rowspan, colspan, multi-paragraph cells, or nested elements will lose structure — Markdown tables are single-line per row. For complex tables, consider keeping the raw HTML instead.
Does it preserve image paths?+
Yes, both relative and absolute image URLs are preserved. If you're migrating between sites, you may still need to update the paths manually after conversion.
What about custom HTML elements like <kbd>, <details>, or <sup>?+
Elements with a clear Markdown equivalent are converted. Unsupported elements can be simplified or omitted, so review them individually instead of assuming raw HTML will be preserved.
Is any HTML sent to a server?+
No. Conversion happens in your browser; mdkit does not upload the HTML to a conversion server.

Related tools

Learn more