Back to Tools

HTML to Markdown

Convert complex HTML structures into clean, lightweight Markdown syntax

0
HTML Input
1

Move content from web markup into plain-text Markdown

Markdown is easier to write, review in version control and keep in a README or static site than raw HTML. When you already have the HTML, say a blog snippet, a help article or an email template, retyping it is tedious. This converter walks through the markup and rewrites the common elements into their Markdown equivalents.

Converting a snippet

  1. Paste your markup into the HTML Input editor, which has line numbers, or use Paste to bring it in from the clipboard. Load Sample fills in a heading, list, quote and link and converts it right away.
  2. Click Convert to Markdown.
  3. Review the Markdown Output panel. The header shows a character count for the result.
  4. Press Copy, or Download to save the text as converted.md. Clear empties the editor.

Which elements are converted

  • Headings h1, h2 and h3 become lines starting with #, ## and ###.
  • b and strong become double asterisks; i and em become single asterisks.
  • Paragraphs are separated by blank lines, and br becomes a line ending with two spaces.
  • Links turn into [text](url), with # used when an anchor has no href.
  • Inline code is wrapped in backticks, and blockquotes get a leading > marker.
  • List items become lines starting with an asterisk.

Where it is handy

  • Porting old blog posts from a CMS into a Markdown-based static site generator.
  • Turning documentation copied from a web page into a README section.
  • Cleaning a formatted snippet so it can go into a chat tool or issue tracker that renders Markdown.
  • Extracting readable text from an HTML email while keeping links and emphasis.

What to expect from the output

This is a compact converter, not a full parser. Elements it does not know, such as tables, images, pre blocks, h4 to h6 headings, div and span, are stripped of their tags and only their inner text is kept. Ordered lists come out as bullet lists because every list item uses an asterisk, and nested lists are not indented. Review the result and patch those parts by hand. The markup is parsed by your browser rather than sent anywhere, so paste only HTML you trust. Whitespace between tags is retained, so tidy the blank lines afterwards if the source was heavily indented.

Related Tools


Frequently Asked Questions

Which HTML tags does the converter understand?
It handles h1 to h3, b, strong, i, em, p, br, ul, ol, li, blockquote, code and links. Other tags, including tables, images and h4 to h6, are dropped and only the text inside them is kept.
Why did my numbered list turn into bullets?
Every list item is written with an asterisk, whether it came from ul or ol, and no numbers are generated. Edit the output manually to add 1., 2., 3. if the order matters.
What happens to images and tables?
Images are removed entirely because they have no text, and table cells are flattened into plain text without pipes or rows. For those elements you will need to write the Markdown syntax yourself after converting the rest.
Can I download the Markdown?
Yes. After converting, click Download to save the output as a file named converted.md, or use Copy to send it to the clipboard. The character count in the header refers to the converted text.
Is my HTML uploaded anywhere?
The conversion is done by JavaScript in your browser, which parses the pasted markup as a page fragment. It is not sent to a server route. Since the browser reads it, paste only markup you trust.
Support Chat
We typically reply within minutes

Hello! 👋 Before we start, please tell us your name.