HTML to Markdown Converter

Convert HTML into Markdown. Supports headings, lists, tables, code blocks, and more.

Input data is processed in your browser
Data is never sent to a server

Tool

Heading style
HTML
0 chars

or drag & drop a file

Markdown0 chars
Lines: 0

What is the HTML to Markdown Converter?

This tool converts HTML — from a web page, a CMS export, or a rich-text editor — into clean Markdown.

It uses the browser’s built-in DOMParser API with no external libraries, so it runs entirely in your browser with nothing to install. It handles all common elements including headings, lists, tables (GFM), code blocks, links, and images. The converted Markdown can be copied to the clipboard or downloaded as a .md file.

How to Use

  1. Paste or type your HTML into the left panel. Markdown is generated instantly on the right. Click "Sample" to see an example.
  2. Enable "Output GFM tables" to convert `<table>` elements into GitHub Flavored Markdown table syntax.
  3. Enable "Keep unconvertible tags as raw HTML" to preserve unsupported elements as-is in the output.
  4. Use the "Heading style" selector to choose between ATX (# syntax) and Setext (=== underline) headings.
  5. Click "Copy Markdown" to copy the result to your clipboard, or "Download Markdown" to save it as `output.md`.

FAQ

How is this different from the Markdown to HTML Converter tool?

This is the reverse direction. The Markdown to HTML Converter turns Markdown into HTML; this tool turns HTML into Markdown.

Which HTML elements are supported?

Headings (h1–h6), paragraphs (p), bold/italic/strikethrough, lists (ul/ol), blockquotes, code blocks (pre/code), GFM tables, links (a), images (img), and horizontal rules (hr) are all supported.

What happens to CSS and JavaScript in the input?

Content inside `<style>` and `<script>` tags is automatically stripped. Only text content and supported structural elements are converted.

What happens to unsupported elements?

By default, only the inner text of unsupported elements is extracted. If you enable "Keep unconvertible tags as raw HTML", the original tag is preserved in the output.