HTML to Markdown Converter

Convert HTML code, or formatted text copied from a web page, Word or Google Docs, into clean Markdown. Headings, lists, links, images, tables and code blocks are converted to GitHub Flavored Markdown.

  • Paste code or rich text
  • Tables & code blocks
  • Runs in your browser

How to use the HTML to Markdown tool

  1. Choose the inputPaste HTML code, or switch to “Paste from a web page” and paste formatted text you copied.
  2. Convert instantlyThe Markdown appears on the right as soon as you paste, and updates as you edit.
  3. Adjust the stylePick the bullet character and whether links are written inline or as references at the end.
  4. Copy or downloadCopy the Markdown or download it as a .md file.

Features

  • Rich text pasteCopy an article from a website, Word or Google Docs and get Markdown without touching any HTML.
  • TablesHTML tables become Markdown pipe tables, with column alignment kept.
  • Code blocksPre-formatted code becomes fenced code blocks, keeping the language name when it is set.
  • Nested lists and checklistsBulleted, numbered and nested lists, plus checkbox lists as task items.
  • Clutter removedScripts, styles, forms and other non-content elements are left out automatically.

Why convert HTML to Markdown?

Markdown is easier to read and edit than HTML, works in Git and note-taking apps, and is the input format of most static site generators and documentation tools. Converting saves you from rewriting content by hand.

  • Moving blog posts from WordPress or another CMS to a static site such as Hugo, Jekyll or Astro
  • Saving an online article as notes in Obsidian, Notion or Joplin
  • Turning a Word or Google Docs document into a README
  • Cleaning messy HTML from an email or web page into plain, structured text

How elements are converted

HTMLMarkdown
<h2>## Heading
<strong>, <em>, <del>**bold**, *italic*, ~~strike~~
<a href>[text](url) or [text][1]
<img>![alt](src)
<pre><code>Fenced code block
<table>Pipe table

Elements without a Markdown equivalent, such as underline, superscript and subscript, are kept as small HTML tags, which most Markdown renderers display correctly.

Getting a clean result

Web pages carry a lot of code that has nothing to do with the content: menus, cookie banners, tracking scripts and layout wrappers. For the tidiest Markdown, give the converter only the part you need.

  • Copy the article, not the page. Select the text you want in your browser and paste it. You get the headings, links and lists without the navigation around them.
  • From Word or Google Docs, copy and paste directly. Bold, italics, headings, lists and tables are carried over, and fonts and colours are dropped, which is usually what you want in Markdown.
  • Check the images. Markdown stores only the address of an image. If the address is relative, such as /images/photo.jpg, it will not load elsewhere until you add the site’s domain or upload the picture to its new home.
  • Complex tables with merged cells cannot be expressed in Markdown. They are simplified, so look them over after converting.

The output follows GitHub Flavored Markdown, which is understood by GitHub, GitLab, Notion, Obsidian, Discord and most static site generators.

Related tools

Need the reverse? Use Markdown to HTML. To keep writing, open the result in the Markdown Editor.

Frequently asked questions

How do I convert a web page to Markdown?
Select and copy the content on the web page, choose “Paste from a web page” here and paste. The Markdown appears instantly.
Does it convert tables?
Yes. HTML tables become GitHub-style pipe tables, and left, center and right alignment is kept.
Can I convert a Word document?
Yes. Copy the text in Word or Google Docs and paste it in “Paste from a web page” mode. Headings, bold, lists and links are kept.
What happens to scripts and styles?
They are removed. Only the content (text, links, images, lists, tables and code) is converted.
Is my HTML uploaded?
No. The conversion runs entirely in your browser.