⬇️ HTML to Markdown
Paste any HTML and instantly convert it to well-formatted Markdown. Preserves headings, bold, italic, links, lists, code blocks, and blockquotes. Powered by the Turndown library.
How to Use the HTML to Markdown
The HTML to Markdown converter transforms HTML markup into clean, readable Markdown syntax using the Turndown library. Paste any HTML — from a web page, a rich text editor, a CMS export, or hand-written markup — into the left panel and click Convert to Markdown. The equivalent Markdown appears in the right panel. Click Copy to copy the Markdown output to your clipboard.
The converter handles the most common HTML elements: <h1>–<h6> become ATX headings (# through ######), <strong> and <b> become **bold**, <em> and <i> become *italic*, <a> links are preserved in [text](url) format, <ul>/<ol> become Markdown lists, <blockquote> becomes > prefixed text, and <pre><code> blocks become fenced code blocks. Click Sample to see a demonstration. Useful for migrating content from WordPress or a CMS to a Markdown-based static site generator like Next.js, Hugo, or Gatsby.
Frequently Asked Questions
What is HTML to Markdown conversion used for?
›
Converting HTML to Markdown is useful when migrating content from a CMS (like WordPress or Drupal) to a static site generator that uses Markdown (like Next.js, Hugo, Jekyll, or Astro). It is also used to convert email HTML to plain readable text, extract content from web pages into editable Markdown, or prepare content for a Markdown-based documentation system like Docusaurus or GitBook.
What HTML elements are converted to Markdown?
›
The Turndown library converts: headings (h1–h6), paragraphs, bold and italic text, hyperlinks, images (as Markdown image syntax), unordered and ordered lists, blockquotes, inline code and code blocks (with fenced style), horizontal rules, and line breaks. Complex HTML like tables, forms, and custom elements may be left as raw HTML in the output.
Does the converter preserve links and images?
›
Yes. HTML anchor tags <a href="url">text</a> are converted to Markdown link syntax [text](url). Images <img src="url" alt="text"> are converted to . Links and images embedded in other elements (like links inside headings or bold text) are also preserved correctly.
What should I do if the Markdown output has too much raw HTML?
›
Some complex HTML cannot be represented in standard Markdown and is left as raw HTML in the output. To reduce raw HTML: simplify your input HTML by removing unnecessary wrapper divs and classes before converting, check that your target Markdown parser supports HTML passthrough if you need to keep some tags, or manually clean up the output after conversion. Most Markdown parsers do accept inline HTML.