Skip to content
ZeroServer.tools

HTML to Markdown Converter

Convert HTML to Markdown syntax. Transforms headings, bold, italic, links, images, lists, blockquotes, and code blocks to their Markdown equivalents.

or drop a file here
Markdown Output
# Welcome to HTML to Markdown

This converter transforms **bold text** and *italic text* to Markdown.

## Features

- Headings (h1-h6)
- Bold and **italic**
- Ordered and unordered lists

### Code Example

Use `inline code` or a block:

```
function hello() {
  return "world";
}
```
> This is a blockquote with important text.

Visit [Example Site](https://example.com) for more info.

![Logo](logo.png)

---

1. First item
2. Second item
3. Third item

About HTML to Markdown Converter

Markdown is a lightweight markup language that is easier to read and write than HTML. Converting HTML to Markdown is useful when migrating content from a CMS to a static site generator, preparing content for GitHub, or writing documentation. This converter handles all common HTML elements: headings (h1–h6), bold, italic, links, images, ordered and unordered lists, blockquotes, inline code, fenced code blocks, and horizontal rules. HTML entities are also decoded in the output.

Built and maintained by Meet Shah · Last updated

What this tool is used for

  • Converting a web page's content into Markdown for a repository or a wiki.
  • Turning a CMS article into a file you can version control.
  • Migrating documentation off HTML onto Markdown.
  • Getting an editable source from rendered output.
  • Converting a fragment for a pull-request description.

Frequently Asked Questions

Which elements convert?
Headings, paragraphs, emphasis, links, images, lists, blockquotes, code blocks and tables — the elements with a direct Markdown equivalent. Everything else has to be dropped or passed through as raw HTML.
What happens to markup Markdown cannot express?
Markdown allows inline HTML, so a `<div>`, a `<span>` with a class or an iframe can be preserved verbatim. The trade-off is that the result is no longer portable to renderers that sanitise HTML.
Why did my nested list lose its indentation?
Usually because the source nested the `<ul>` outside the `<li>` rather than inside it. Browsers render that leniently but it is invalid, and the structure a converter reads is the invalid one.
Are tables converted?
To GitHub-flavoured pipe tables, which are not part of the original Markdown specification but are supported almost everywhere. Merged cells have no representation and are flattened.
Why do underscores appear escaped?
Because `_` and `*` mark emphasis in Markdown, so a literal one in text must be escaped or it silently italicises the rest of the line. The same applies to backticks, brackets and a leading `#`.
Is the conversion lossless?
No, and it cannot be — Markdown deliberately expresses less than HTML. Classes, ids, inline styles and most attributes have nowhere to go. Converting back gives you clean semantic markup, not the original document.

Common errors and gotchas

  • Expecting every element to convert, since Markdown has no equivalent for many and they stay as raw HTML.
  • Losing table structure, particularly where cells are merged.
  • Producing escaped characters everywhere because the source text contains Markdown syntax literally.
  • Dropping attributes such as image dimensions or link titles that Markdown handles differently.
  • Converting a layout-heavy page, where the result is structurally meaningless.

Related Converters tools

Private & free — this tool runs entirely in your browser.

IndieKitShip your Next.js startup in days.affiliate