HTML to Markdown Converter

Paste HTML to convert it into clean, readable Markdown.

Advertisement

Convert HTML to Markdown

Moving a blog from WordPress to a static site generator, copying documentation into a GitHub README, or saving a web page as notes in Obsidian all start with turning HTML into Markdown. This converter maps headings, paragraphs, links, images, bold and italic text, lists, blockquotes and code to their Markdown equivalents.

<script>, <style> and <noscript> blocks are dropped, and code inside <pre> becomes a fenced code block. Tip: to convert part of a live web page, right-click it, choose Inspect, then copy the element's outer HTML and paste it here.

Example

HTML input:

<h2>Getting started</h2>
<p>Install it with <code>npm</code>, then read the <a href="https://example.com/docs">docs</a>.</p>
<ul>
  <li>Fast</li>
  <li><em>Free</em></li>
</ul>

Markdown output:

## Getting started

Install it with `npm`, then read the [docs](https://example.com/docs).

- Fast
- *Free*

Frequently asked questions

Are HTML tables converted?
Tables are kept as their text content, since standard Markdown has no table syntax. For tables, copy the data into the CSV to Markdown Table tool instead.
What happens to classes, inline styles and divs?
They are removed — Markdown has no way to express them. Only the content and its structure (headings, lists, links, emphasis, code) is kept.
Can I use # headings or underlined headings?
Both. Choose “# Heading” (ATX style, the most common) or the underlined style using === and --- for the top two levels.
Is my HTML uploaded anywhere?
No. The conversion runs entirely in your browser.

Related tools