HTML to Markdown Converter Online

Paste HTML and get clean GitHub-flavored Markdown — headings, links, images, lists, tables. 100% browser-side.

What is an HTML to Markdown converter?

An HTML to Markdown converter takes HTML markup and emits the equivalent Markdown — collapsing presentational tags, preserving semantic structure, and producing a portable plain-text document. This converter parses HTML via the browser's built-in DOMParser and walks the resulting tree to emit GitHub-flavored Markdown.

CMS migrations, content-scraping pipelines, and documentation imports all need this conversion. Markdown stores cleanly in Git, diffs nicely, and renders in every developer tool — making it the right home for content that started life in WordPress, Confluence, or an old static page.

How to convert HTML to Markdown — 4 steps

  1. Paste HTML. Copy a page's body content or any HTML fragment into the left input.
  2. Read the Markdown. The converter renders the result on the right — semantic structure preserved, styling dropped.
  3. Verify edge cases. Tables, nested lists, and code blocks are the usual sources of friction — eyeball them before publishing.
  4. Copy the result. Click Copy Markdown and paste into your README, wiki, or static-site source.

Sample input and output

<h2>Hello</h2>
<p>Some <strong>bold</strong> text and a <a href="https://x.com">link</a>.</p>
<ul><li>one</li><li>two</li></ul>
## Hello

Some **bold** text and a [link](https://x.com).

- one
- two

DOM-based Walk

The converter parses HTML via DOMParser and walks the tree node-by-node — handling nesting, mixed content, and weird whitespace correctly.

GFM Tables

HTML tables are converted to GitHub Markdown table syntax with pipe separators and a header row. Complex layout tables are flattened.

No Upload

All conversion happens in your browser. CMS exports, internal page HTML, and email-template markup never leave the device.

Common use cases

  • check_circleMigrating WordPress, Ghost, or Drupal posts into a Git-tracked Markdown blog
  • check_circleScraping documentation pages into a unified knowledge base
  • check_circleConverting Confluence or Notion HTML exports to portable Markdown
  • check_circleExtracting article content from RSS or web pages for AI ingestion
  • check_circleCleaning up email-template HTML before pasting into a README
  • check_circleTranslating legacy CMS content into a static site (Hugo, Astro, Next.js)
  • check_circleProducing diffable docs in version control from HTML CMS exports
  • check_circlePreparing input for Markdown-based knowledge tools (Obsidian, Logseq)

HTML versus Markdown — what is preserved

Markdown is a deliberately small format — it covers the structural elements common to most prose (headings, paragraphs, lists, links, images, blockquotes, code, tables) and intentionally omits everything else. Any HTML beyond that subset — inline styles, custom classes, font choices, complex tables with rowspan/colspan, embedded video — is dropped or flattened during conversion. If you need that fidelity, keep the source as HTML.

More format conversions

Round-trip between HTML, Markdown, and JSON without leaving the browser.

Frequently Asked Questions

Why convert HTML to Markdown?

Markdown is easier to author, diff, version, and review than HTML. Teams migrate CMS content into Git-tracked docs, scrape blog posts into a knowledge base, or extract email-template body into a README. Anywhere humans need to read and edit text in plain form, Markdown wins over HTML — and a one-shot converter is faster than retyping.

Are CSS styles preserved?

No — Markdown has no styling primitives. Inline styles, classes, font sizes, and colors are dropped during conversion. Only semantic structure (headings, lists, tables, links, emphasis) survives. If you need pixel-perfect styling, keep the source as HTML; if you need readable, portable text, Markdown is the right target.

How are nested tables handled?

GitHub-flavored Markdown does not support nested tables — the spec only allows simple cells with inline content. The converter renders the outer table and concatenates inner-table cell text into the corresponding parent cell. If you rely on nested tables for layout, the result will be lossy; consider restructuring the content first or keeping it as HTML.

What HTML tags are supported?

h1-h6, p, strong/b, em/i, code, pre, a, img, ul, ol, li, blockquote, hr, br, and table (with thead/tbody/tr/th/td). Structural wrappers like div, section, article, main are unwrapped — their children are emitted with their original tags. Unknown tags are unwrapped to text. Script and style tags are stripped.

Why is whitespace collapsed in my output?

HTML treats most whitespace as insignificant — multiple spaces, tabs, and newlines collapse to a single space. The converter follows this rule for inline text. Block-level boundaries (headings, lists, paragraphs) emit blank lines. If your source uses <pre> or <code>, whitespace inside is preserved verbatim.

Does it sanitize the HTML input?

The HTML is parsed via the browser DOMParser, which is sandboxed — script, iframe, and event handlers are not executed during parsing. The Markdown output contains no executable code by definition. That said, if you paste the resulting Markdown back into a renderer, run it through your usual sanitizer if the source was untrusted.

Can I convert a whole web page?

Yes — paste the body HTML or the full document. The converter unwraps html, head, body, and div containers and converts the visible structural elements. For best results, paste only the article content (between the main <article> tags) so navigation and footer markup is excluded.

Is my HTML uploaded to a server?

No. Parsing and conversion run in your browser using JavaScript and the built-in DOMParser. Internal CMS content, scraped pages, and email HTML never leave the device. Confirm in DevTools — no requests fire when you click Sample or paste.

HTML to Markdown Converter Online — Free HTML to MD Tool