AZ Tools

HTML → Markdown Converter

Convert

Paste HTML (a fragment or full page) and get GitHub-flavored Markdown. The converter walks the DOM and emits proper Markdown for every common tag: `<h1>`–`<h6>`, `<p>`, `<strong>`, `<em>`, `<a>`, `<img>`, `<ul>` / `<ol>` (nested supported), `<table>`, `<blockquote>`, `<pre><code>` with language detection, `<hr>`, `<br>`. Scripts and styles are stripped. Useful for converting CMS exports, blog posts, or copied web pages into Markdown.

Markdown
Paste HTML on the left.

Conversion runs entirely in your browser via DOMParser. No data leaves the page.

How to use

  1. Paste HTML (a fragment is fine — no need for `<html>` / `<body>`).
  2. Choose your bullet style and whether to keep links and images.
  3. Copy the Markdown output.

Frequently asked questions

What about non-standard tags or attributes?
Unknown inline tags pass through as their inner text. Unknown block tags become paragraphs. Style/class/data-* attributes are dropped — Markdown can't represent them anyway.
Does it preserve code-block language?
Yes — if the `<code>` element has a class like `language-js` or `language-python`, the fence is annotated with that language.
Tables not converting correctly?
Markdown tables can't represent merged cells (`colspan`/`rowspan`) or nested blocks within cells. Complex tables get flattened — sometimes you'll need manual cleanup.
Why does pasting from Word produce weird output?
Word's HTML export is famously bloated with mso-* styles and proprietary tags. Paste into a plain `<textarea>` first or use a Word→Markdown specific tool for cleaner output.

Related tools