AIO Copilot

HTML to Markdown Converter

Paste HTML and get clean Markdown back as you type. It runs in your browser with the open-source Turndown library, so nothing you paste is sent anywhere.

# Welcome to Our Site This is a **paragraph** with *emphasis* and a [link](https://example.com). ## Features - Fast conversion - Clean output - Configurable options ``` const hello = "world"; ```

How the HTML to markdown converter works

Paste the HTML, pick a heading and bullet style, copy the Markdown.

  1. Paste the HTML

    Paste markup into the input box. A short sample is loaded so you can see the output first. Paste the article body rather than the whole page source, because script and style contents come through as text.

  2. Pick the options

    Choose ATX (# Heading) or Setext (underlined) headings, and a dash, asterisk or plus for bullets. Setext covers only H1 and H2; deeper headings get # marks either way.

  3. Check the output

    The Markdown updates as you edit. Look closely at tables and struck-through text, which this converter flattens to plain text.

  4. Copy it

    Copy puts the Markdown on your clipboard, ready for your editor, static site generator or AI tool.

How do you convert HTML to Markdown?

Paste the HTML into the box above and copy the Markdown out. The converter hands your markup to the browser's own HTML parser, walks the elements it finds and writes each one in its Markdown form: an h2 becomes ## Heading, a link becomes [text](url), a list item becomes a line starting with your bullet character, and a pre block becomes a fenced code block between triple backticks. Elements with no Markdown equivalent, such as div and span, are dropped and their text kept. The work is done by Turndown, an open-source converter, running inside this page.

What converts, and what does not?

HTMLWhat you get
h1 to h6# to ###### headings, or underlined H1 and H2 in Setext mode
p, brParagraphs separated by a blank line; br becomes a hard line break
strong, b, em, i**bold** and *italic*
a[text](url "title"), with the URL copied exactly as written
img![alt](src); an image with no src is dropped
ul, ol, liBulleted or numbered lines, with nested lists indented
blockquoteLines starting with >
pre, codeFenced code blocks (a language-js class becomes the js label on the fence); inline code in backticks
hr* * *
tableNot converted: each cell's text lands on its own line
del, sNot converted: the text stays, the strike is lost
script, styleNot removed: their code comes through as plain text

ATX or Setext headings: which should you pick?

Pick ATX unless a style guide says otherwise. The CommonMark specification, the reference most Markdown tools follow, allows ATX headings with one to six # characters, while Setext headings, underlined with = or -, can only express levels 1 and 2. Turndown's own default is Setext; this tool starts on ATX. In Setext mode, H3 to H6 still come out with # marks because Setext has no way to write them, so a long document ends up mixing both styles.

Why are my tables and strikethrough missing?

Because neither is part of core Markdown. John Gruber's original Markdown, released as version 1.0.1 on 17 December 2004, has no table syntax, and neither does CommonMark. Tables and strikethrough arrived as extensions in GitHub Flavored Markdown, alongside task lists and bare-URL autolinks. Turndown supports them only through a separate GFM plugin, which this tool does not load, so a table comes out as one line per cell and struck-through text loses its strike. Rebuild a table with pipes and dashes, or paste the original table HTML into your Markdown file: CommonMark treats an HTML block as raw HTML that "will not be escaped" in the output.

Can I convert a whole web page?

Yes, but paste the article, not the whole source. Turndown has no rule for script and style elements, so their code comes through as plain text, and the navigation, cookie banner and footer links convert along with the content. Open the page's source or your browser's developer tools, copy the main element or the article body, and paste that. Broken markup is less of a worry: the HTML standard "defines the parsing rules for HTML documents, whether they are syntactically correct or not," so unclosed tags are repaired the way a browser repairs them before the conversion starts.

Links and images keep their URLs exactly as written. Relative paths such as /pricing or ../img/chart.png break when the Markdown moves to another domain or folder, so make them absolute first or fix them in the new site.

Is Markdown better than HTML for AI tools?

For feeding text to a model, usually, because it carries the same structure in far fewer characters. When Cloudflare launched Markdown conversion for AI agents in February 2026, it reported that one of its own blog posts took 16,180 tokens as HTML and 3,150 as Markdown, an 80% cut. Fewer tokens means more of a document fits in ChatGPT's or Claude's context window and less is spent per request.

Publishing Markdown copies of your pages is a different matter. Google's guide to AI features says site owners "don't need to create new machine readable files, AI text files, or markup" to appear in AI Overviews or AI Mode, so a Markdown version of your site serves your own AI workflows, not your rankings. Our guide to AIO, AEO and GEO covers what does affect citations in AI answers.

Moving a site to a Markdown CMS?

Convert one representative page first and check what breaks. Static site generators read Markdown natively: Hugo's documentation says "Markdown is Hugo's default content format" and renders it with Goldmark, which conforms to CommonMark and GitHub Flavored Markdown, so rebuilt pipe tables will display there. Hugo refuses HTML content files unless you switch them on, which is one more reason to convert. If URLs change in the move, Google's site move guide asks for server-side permanent redirects, such as 301 or 308, kept "generally at least 1 year." Our technical SEO audit checklist lists the checks to run after a migration, and the Markdown to HTML converter renders finished Markdown so you can check it before it goes live.

HTML to Markdown questions.

What the converter keeps, drops and repairs.

Does the converter handle HTML tables?

No. Tables are a GitHub Flavored Markdown extension, and Turndown converts them only through a separate plugin that this tool does not load, so each cell's text comes out on its own line. Rebuild the table with pipes and dashes, or paste the original table HTML into your Markdown file: CommonMark passes an HTML block through to the output unescaped.

What is the difference between ATX and Setext headings?

ATX headings start with one to six # characters, so they cover every heading level. Setext headings are underlined with = for level 1 or - for level 2 and cannot express anything deeper. In Setext mode this tool still writes H3 to H6 with # marks, so pick ATX unless a style guide requires Setext.

Is my HTML sent to a server?

No. The conversion runs in your browser with the open-source Turndown library, and the HTML you paste is not uploaded or stored. You can paste unpublished drafts or internal pages.

Why does my Markdown contain JavaScript or CSS?

Turndown has no rule for script and style elements, so their contents come through as plain text. Paste only the main content of a page, such as the article or main element, rather than the full source. Navigation and footer links convert too, so leave them out for the same reason.

Does it work on broken or badly nested HTML?

Yes, in most cases. The markup is parsed by your browser, which follows the HTML standard's rules for documents whether they are syntactically correct or not, so unclosed and misnested tags are repaired before conversion starts. The result matches what a browser would display, which is not always what the author intended.

What is Markdown?

Markdown is a plain-text writing format that converts to HTML, created by John Gruber, whose 1.0.1 release dates from 17 December 2004. Gruber's stated design goal was to make the syntax "as readable as possible", so # marks a heading and asterisks mark emphasis. Most tools now follow the CommonMark specification, and GitHub Flavored Markdown adds tables, task lists and strikethrough.

Migrating content between platforms?

If URLs change in the move, each old address should redirect once, straight to its new home. The free Redirect Chain Checker shows chains and loops in a redirect path before they cost you visitors.

Check your redirects

What to do next.