Skip to content
Toolcroft

HTML to Markdown Converter - Free Online Tool

Text Tools

Convert HTML to Markdown instantly in your browser. Supports headings, lists, tables, links, images, code blocks, and more. No server, no signup.

HTML Input
Markdown Output
  • Headings: h1 through h6, in ATX or setext style
  • Text formatting: bold, italic, strikethrough, inline code
  • Code blocks: pre / code with language class
  • Links and images: with href, src, alt, and title attributes
  • Lists: ordered and unordered, with nesting support
  • Tables: converted to GFM pipe table syntax
  • Blockquotes: with > prefix
  • Horizontal rules: hr -> ---

About the conversion engine

The converter uses the browser's built-in DOMParser API to parse your HTML into a proper DOM tree, then walks each node to produce clean Markdown. This means it correctly handles nested structures and doesn't get confused by attributes or multi-line elements the way a simple regex approach would.

Element conversion reference

HTML elementMarkdown output
<h1><h6>####### (ATX style)
<strong>, <b>**text**
<em>, <i>*text*
<a href="url">[text](url)
<img src="url" alt="...">![alt](url)
<code>backtick-wrapped inline code
<pre><code>fenced code block (```)
<ul> / <ol>- item / 1. item
<blockquote>> text
<table>GFM pipe table syntax
<hr>---
<del>~~text~~

Limitations

Not all HTML converts cleanly to Markdown. Common problem areas include:

  • Complex tables with merged cells (colspan/rowspan)
  • Deeply nested or inconsistently structured lists
  • Inline styles and <div>/<span> wrappers with no semantic meaning
  • HTML comments, <script>, and <style> blocks

Output from these elements may need manual cleanup after conversion.

Use cases

  • Converting CMS-exported HTML into documentation (Docusaurus, MkDocs, GitBook)
  • Migrating legacy web pages to static site generators
  • Extracting content for plain-text publishing or email newsletters
  • Reducing HTML bloat when copying content between platforms

About the conversion engine

The converter uses the browser's built-in DOMParser API to parse your HTML into a proper DOM tree, then walks each node to produce clean Markdown. This means it correctly handles nested structures and doesn't get confused by attributes or multi-line elements the way a simple regex approach would.

Browse all text tools