HTML to Markdown converter

Turn HTML into clean, readable Markdown.

Runs in your browser. Nothing you type is sent anywhere.

How to convert HTML to Markdown

  1. Paste your HTML.
  2. The Markdown appears as you type.
  3. Copy or download the Markdown file.

How elements convert

HTMLMarkdown
<h2>Title</h2>## Title
<strong>bold</strong>**bold**
<a href="...">text</a>[text](...)
<code>x</code>`x`
<pre><code>...</code></pre>a fenced ``` code block

What does not convert cleanly

  • HTML tables come through as plain text, not Markdown table syntax.
  • Inline styles and CSS classes are dropped, since Markdown has no equivalent for them.
  • Layout divs and other nonstandard structural HTML become plain paragraphs.
  • Repeated spaces and line breaks used only for visual spacing collapse to a single space, the same way a browser would normally treat extra HTML whitespace.

Where converted Markdown is used

  • Pasting a web page into a README or wiki that only accepts Markdown.
  • Feeding cleaned-up content into a static site generator.
  • Moving documentation out of a CMS export and into a Markdown-based docs tool.
  • Cleaning up rich text pasted from an email before checking it into a plain-text changelog.

Markdown output style

  • Headings use the # style (ATX), not the older underline style written with === or ---.
  • Code blocks use triple backtick fences, not 4-space indentation.
  • Bold text uses ** and italic text uses *, matching Turndown's default style.

HTML to Markdown FAQ

What HTML elements convert well?

Headings, paragraphs, lists, links, images, bold and italic text, blockquotes and code blocks all convert cleanly.

Are HTML tables converted?

Not into Markdown table syntax. Tables come through as their text content, since Markdown table support varies a lot between tools.

Can I paste a whole web page?

Yes. Paste the page's HTML source and the readable content converts to Markdown.

Which library powers this?

Turndown, a widely used HTML-to-Markdown converter, set to ATX-style headings (# Heading) and fenced code blocks.

Does it handle nested lists?

Yes. Nested <ul> and <ol> elements convert to indented Markdown list items, keeping their nesting level.

Does it convert HTML entities like &amp; or &nbsp;?

Yes, common entities convert to their plain character equivalents in the Markdown output, so &amp; becomes a literal & and &nbsp; becomes a normal space.

What happens to blockquotes and horizontal rules?

A <blockquote> becomes a line starting with >, and an <hr> becomes a line of three dashes, both standard Markdown syntax.

Can I convert HTML copied straight from Word or Google Docs?

Yes, though the source often carries extra span tags and inline styles for formatting. Those are dropped since Markdown has no equivalent, leaving the visible text, headings, links and lists intact.

Related tools