Convert HTML to Markdown

Paste HTML — a copied article, an email template, an export from a CMS — and get readable Markdown back. Tables, strikethrough and task lists are converted using GitHub Flavored Markdown, scripts and styles are dropped, and elements with no Markdown equivalent are kept as inline HTML so nothing is silently lost.

✓ Runs in your browser — nothing uploaded Free, no sign-upNo watermark

How to use the HTML to Markdown

  1. Copy the HTML source (in a browser: right-click → Inspect, then copy the element).
  2. Paste it into the input box.
  3. Adjust heading style, bullet character and link style if your project has a house style.
  4. Copy the Markdown, or download it as a .txt file.

What converts cleanly

Headings, paragraphs, bold and italic, ordered and unordered lists (including nesting), blockquotes, links, images, inline code, preformatted blocks and horizontal rules all have direct Markdown equivalents and convert without loss. With GitHub Flavored Markdown enabled, <table> becomes a pipe table, <del> and <s> become ~~strikethrough~~, and checkbox lists become task lists.

What cannot convert, and what happens to it

Markdown has no syntax for colours, column layouts, spans, video or forms. Rather than deleting those elements, the converter leaves them as inline HTML — which is valid Markdown and renders correctly in most processors, including GitHub and static site generators. Scripts, stylesheets, iframes and embedded objects are removed outright because they carry no document content. Class and style attributes disappear, which is usually the point of converting: you get the structure and the words without the presentation.

HTMLMarkdown
<h2>Title</h2>## Title
<strong>, <b>**bold**
<code>x</code>backtick x backtick
<pre><code class="language-py">fenced block tagged py
<table>pipe table (GFM on)
<div style="…">kept as inline HTML

Cleaning up a page copied from the web

HTML copied from a live site usually arrives wrapped in navigation, tracking pixels and half a dozen nested wrapper divs. Two habits help: copy only the article element from the browser inspector rather than the whole page, and run the result through a Markdown linter or simply re-read it, because empty wrappers can leave stray blank lines. Non-breaking spaces from a CMS often survive as invisible characters; a find-and-replace for them is worth doing before you commit the file.

Escaping

Characters that mean something in Markdown — asterisks, underscores, square brackets, backticks, hash signs at the start of a line — are escaped with a backslash when they appear in body text, so a sentence about *args will not turn into italics. That is why converted text sometimes contains more backslashes than you expect; they disappear again when the Markdown is rendered.

Round-tripping

HTML → Markdown → HTML will not return byte-identical markup, because Markdown cannot record every attribute. It does preserve the semantic structure, which is what matters for migrating content between systems, writing documentation from a design tool, or keeping a plain-text archive of published articles.

Frequently asked questions

Are tables supported?

Yes, with GitHub Flavored Markdown enabled. Tables with merged cells (colspan or rowspan) have no Markdown equivalent and are kept as HTML.

What happens to divs, spans and styles?

Presentational wrappers and their attributes are dropped; elements with no Markdown equivalent are kept as inline HTML so the content survives.

Why are there backslashes in the output?

They escape characters that would otherwise be Markdown syntax, such as * or _ inside ordinary text. They vanish when the Markdown is rendered.

Can I convert a whole web page by pasting its URL?

No — this tool works on HTML you paste, with no network requests. Copy the source, or the article element from your browser inspector.

Privacy

This tool runs entirely inside your browser using WebAssembly and the Canvas/File APIs. Your files are never uploaded to ToolFlint or any third party; you can verify this in your browser's network tab or by switching to airplane mode after the page loads. Read how we process files.

Last updated 2026-09-23.