HTML to Markdown

Your data never leaves your browser

Convert raw HTML or rich text copied from the web to clean Markdown. GitHub Flavored Markdown output, tables, strikethrough, and task lists included.

GitHub Flavored Markdown - tables, task lists, strikethrough
Input - HTML
Output - Markdown
Ctrl+Shift+CCopyCtrl+KClearTip: copy styled content from any webpage and use the clipboard paste button

Share this tool

Found it useful? Help a fellow developer discover it.

https://developertoolkit.dev/tools/html-to-markdown

HTML element → Markdown mapping

HTMLMarkdown output
<h1>–<h6># Heading 1 – ###### Heading 6
<strong>, <b>**bold**
<em>, <i>_italic_
<a href="">[text](url)
<code>`inline code`
<pre><code>```fenced code block```
<ul><li>- list item
<ol><li>1. list item
<blockquote>> blockquote
<table>GFM pipe table
<del>, <s>~~strikethrough~~ (GFM)
<hr>---
<img>![alt](src)

How to convert rich text from the web

When you copy styled content from a webpage (Ctrl+C), your clipboard holds two versions: the plain text and the underlying HTML with formatting tags. Pasting into a plain-text input gives you only the text. But clicking the Paste rich text from clipboard button reads the HTML version, which this tool then converts to clean Markdown. Preserving headings, bold, italic, links, code blocks, and tables. This workflow is the fastest way to convert documentation, blog posts, or README content from the web into Markdown for use in GitHub, Notion, or any Markdown editor.

When to convert HTML to Markdown

Frequently Asked Questions

How do I convert HTML to Markdown online?

Paste raw HTML into the input panel and the Markdown output appears instantly on the right. For styled content copied from a webpage, click the Paste rich text from clipboard button to read the HTML version from your clipboard and convert it directly. Click Copy to copy the Markdown output.

Why would I convert HTML to Markdown?

Markdown is easier to write, read, and version-control than HTML. Converting HTML to Markdown is useful when migrating documentation from a CMS to GitHub, moving blog posts to a static site generator, cleaning up Confluence or Notion exports, or preparing reference material for LLM prompts where Markdown uses fewer tokens than raw HTML.

Does this support all HTML elements?

Semantic elements are converted: headings (h1-h6), bold, italic, links, images, inline code, fenced code blocks, ordered and unordered lists, blockquotes, horizontal rules, and GFM tables and strikethrough. Inline styles, CSS classes, span tags, div wrappers, and presentational attributes are stripped because Markdown has no equivalent for them.

Can I convert rich text copied from Google Docs or Notion?

Yes. When you copy content from Google Docs, Notion, Confluence, or most web-based editors, the clipboard holds HTML internally. Use the Paste rich text from clipboard button to read the HTML version and convert it to Markdown.

Are GitHub Flavored Markdown tables supported?

Yes. The converter uses the turndown-plugin-gfm plugin, which converts HTML table elements to GFM pipe tables. Strikethrough (del) and task list checkboxes (input type checkbox) are also supported.

What happens to inline styles and CSS classes?

Inline styles and CSS classes are stripped. Markdown has no equivalent. Only semantic HTML elements are converted. Visual-only formatting is discarded.

Does the tool convert Markdown to HTML?

Not directly. For Markdown to HTML, use the Markdown Preview tool which renders Markdown live in the browser and includes a Copy HTML button to get the rendered HTML output.

Why does the clipboard paste button not work in Firefox?

Firefox restricts access to non-text clipboard MIME types such as text/html for security reasons. The button falls back to plain text in Firefox. For best results, use Chrome or Edge, or paste raw HTML manually into the input panel.

Related Tools