HTML to Markdown Converter

Paste HTML and get tidy Markdown you can use in a README, a documentation site, a static site generator or a note app. Headings, paragraphs, bold and italic text, links, images, lists, quotes, code blocks and tables are converted, while scripts, styles and comments are dropped. Everything runs in your browser.

What you enter

  • HTML
  • Bullet character
  • Keep links
  • Keep images

What you get

  • Markdown length

How it works

  1. Paste an HTML snippet or a whole page into the box. Only the visible content is converted.
  2. Choose the bullet character, and whether to keep links and images.
  3. The Markdown appears straight away. Characters that Markdown would misread, such as stars and underscores in plain text, are escaped for you.
  4. Copy the result or download it as a .md file.

When Markdown is the better format

Markdown stores content, not design. A page written in Markdown can be rendered by a documentation tool, a blog engine or a chat app, each in its own style, and it stays readable as plain text. That is why READMEs, help articles and notes are usually kept in it, and why many static site tools take Markdown files as their source.

HTML is better when the exact layout matters. If you convert a landing page with columns, buttons and background images, you will keep the words and lose the design. Use this converter for articles, documentation and notes, and keep the original HTML for pages whose look is part of the message.

Cleaning up after a conversion

Pages copied from a content management system often carry wrapper divs, inline styles and empty paragraphs. Those disappear in conversion, but the text left behind can still contain stray non-breaking spaces or doubled line breaks, so a quick read of the result is worthwhile. Headings are the most important thing to check: a page that used bold paragraphs instead of real heading tags will come out as bold text.

Next, look at links and images. Absolute addresses survive unchanged, but images that were loaded by a script or a background style are not present in the HTML and cannot appear in the output. If the source had a table of contents, you may also want to remove it and let your Markdown tool generate one from the headings.

Tips

  • Convert only the part you need. Copy the article body rather than the whole page, or the menus and footers come along too.
  • Markdown has no colours, fonts, classes or columns. Layout built with divs and styles becomes plain paragraphs, which is usually what you want for content.
  • Tables become pipe tables with the first row as the header. Cells that contain lists or paragraphs are flattened to one line.
  • Check relative links and image paths afterwards. A link like /pricing stays as written and will only work if the Markdown ends up on the same site.
  • Code blocks keep their language when the HTML has a class such as language-js, so syntax highlighting still works after the move.

Frequently asked questions

How do I convert HTML to Markdown?

Paste the HTML into the box. Each element is mapped to its Markdown form: h1 to h6 become lines starting with one to six # signs, strong becomes **bold**, em becomes *italic*, a becomes [text](address), and ul and ol become lines starting with - or numbers.

What is lost in the conversion?

Anything Markdown cannot express: inline styles, classes, ids, colours, forms, buttons, scripts, iframes and complex table features such as merged cells. The text and the structure of headings, lists, links, images, quotes, code and simple tables are kept.

Does it handle broken or messy HTML?

Mostly, yes. Unclosed paragraphs and list items are closed where a browser would close them, stray closing tags are ignored, and character references like & and © are decoded. Heavily malformed pages may still need a manual tidy.

Why are some characters escaped with a backslash?

Stars, underscores, backticks and square brackets mean something in Markdown. If they appear in ordinary text, a backslash in front stops them from turning into formatting. For example, the text 5 * 3 becomes 5 \* 3.

Is my HTML uploaded?

No. It is parsed and converted in your browser and never leaves your device.

Related: Text to HTML converter, HTML table generator, Case converter.

Start for free or see all free tools. We.Inc is free to start, with no card needed. AI building is on paid plans from $20 a month.

More in Free Tools

Product

Who It's For

Features

Resources

Company

View Sitemap