HTML to Markdown converter

Paste HTML code or rich text from a web page, Google Docs or Word and get clean Markdown. Free, no sign-up, and everything runs in your browser.

Paste HTML code, or copy formatted text from a web page, Google Docs or Word and paste it here. The Markdown updates as you type.

Headings

Bullets

Links

Markdown

Paste some HTML above to see the Markdown.

What this HTML to Markdown converter does

This tool turns HTML into clean Markdown that you can paste into a README, a docs site, a notes app or a launch post. It reads headings, paragraphs, bold and italic text, links, images, lists (nested and numbered), quotes, code blocks with their language, tables, task lists and strikethrough, and writes each one in GitHub-flavored Markdown.

You can paste HTML code, or copy formatted text straight from a web page, Google Docs or Word. When you paste, the tool reads the formatted version from your clipboard instead of the plain text, so headings, links and bold text survive the trip.

It runs in your browser tab. The browser parses your HTML into a separate, in-memory document1, and because that document has no browsing context, scripting is disabled in it.2 Scripts in the pasted HTML never run, images are not loaded, and nothing is uploaded.

How to convert HTML to Markdown

  1. Paste HTML or rich text into the box. The Markdown updates as you type.
  2. Pick the style you want: # Heading or underlined headings, the bullet character (-, * or +), and inline links or reference links. Reference links keep long URLs out of your sentences and list them at the end.
  3. Switch to Preview to check the result as rendered Markdown. The preview shows images as placeholders, so it doesn't request anything from other sites.
  4. Select Copy Markdown, or Download .md to save a file.

What changes when HTML becomes Markdown

Markdown covers only a small part of HTML. Its creator describes it as a writing format, not a replacement for HTML, and says to use HTML itself for anything the syntax doesn't cover.3 So some things can't come across one to one:

  • Styling is dropped. Colors, fonts, classes and layout have no Markdown form. Bold, italic and strikethrough that Google Docs writes as inline styles are kept as **, * and ~~.
  • Tables are simplified. A GitHub-flavored Markdown table has one header row, a delimiter row and data rows, and block-level elements can't go inside it.4 The tool joins line breaks in a cell with <br>, flattens nested tables, and adds empty cells where a cell spans several columns. It tells you when that happens.
  • Some tags stay as HTML. <sup>, <sub> and <kbd> have no Markdown syntax, so they are kept as tags, which Markdown allows.3
  • Scripts, styles, forms and embeds are removed. They aren't readable text.

Characters that Markdown would read as formatting, such as *, _, [ or a # at the start of a line, are escaped with a backslash. CommonMark lets any ASCII punctuation character be escaped this way, so the text shows exactly as it did in the HTML.5 A line break inside a paragraph becomes a backslash at the end of the line, which CommonMark reads as a hard line break.5

If you are turning an old landing page into a README or reusing copy from your site for a product launch post, convert it here, then compare it with your edited version in the diff checker.

Frequently asked questions