{ HTML to Markdown }

// convert HTML to clean Markdown instantly

Convert HTML to clean Markdown instantly. Supports headings, bold, italic, links, images, lists, tables, code blocks, blockquotes and more — browser-based, free, no sign-up.

HTML → MARKDOWN
Headings
Bullets
Code
0 chars

Markdown output appears here

Paste HTML and click Convert — or enable Live convert

HOW TO USE

  1. 01
    Paste HTML

    Paste any HTML — a blog post, a documentation page, an article from a CMS, or page source copied from a browser. Full documents and fragments both work.

  2. 02
    Pick your style

    Choose ATX headings (# symbols) or Setext (underlines), bullet character, and fenced vs indented code block style. Options update the output instantly.

  3. 03
    Copy or preview

    Switch to the Preview tab to see the rendered Markdown. Copy the raw Markdown or download it as a .md file ready to commit to your repository.

FEATURES

Full HTML support Tables → pipes Code blocks Live preview Style options Download .md

USE CASES

  • ↓ Migrate CMS content to a static site generator
  • ↓ Convert blog posts to GitHub README files
  • ↓ Save web article as a Markdown note
  • ↓ Extract content from HTML emails to Markdown
  • ↓ Convert documentation HTML to Markdown docs

WHAT IS THIS?

HTML to Markdown converter parses HTML and translates every supported element to its Markdown equivalent. It handles the full CommonMark element set including headings, inline formatting, links, images, lists, tables, code blocks, and blockquotes — all in your browser, free, with no data sent anywhere.

RELATED TOOLS

FREQUENTLY ASKED QUESTIONS

What HTML elements are converted?

The converter handles: headings h1h6; inline formatting including strong, b, em, i, s, del, u, and code; block elements including p, blockquote, pre, code; links a with href and title; images img with src and alt; ordered and unordered lists including nested; pipe tables from table, thead, tbody, tr, th, td; and horizontal rules hr.

What is the difference between ATX and Setext headings?

ATX headings use hash symbols: # Heading 1, ## Heading 2, up to ###### Heading 6. Setext headings use underline characters: Heading 1\n========= and Heading 2\n---------. Setext only supports h1 and h2 — deeper headings always use ATX even in Setext mode. ATX is the most widely supported and recommended format for new documents.

How are HTML tables converted?

HTML tables are converted to GFM (GitHub Flavored Markdown) pipe table format. The header row from <thead> forms the first row, followed by a separator row of dashes |---|, and then the body rows from <tbody>. Column alignment is inferred from any align or style attributes. Tables without a <thead> have one generated from the first row.

What happens to HTML elements with no Markdown equivalent?

HTML elements that have no Markdown equivalent — <div>, <span>, <section>, <article>, <header>, <footer>, and similar structural elements — are not converted. Their text content is preserved and placed inline or as a block depending on whether the element is block-level. Any attributes, classes, and IDs on those elements are dropped.

How are code blocks converted?

A <pre><code> block is converted to a fenced code block with triple backticks. If the inner <code> element has a class like language-javascript or class="js", the language identifier is extracted and placed after the opening fence. Inline <code> elements are converted to single backtick inline code.

Can it convert a full HTML page?

Yes. When you paste a full HTML document, the converter strips the <html>, <head>, and <body> wrapper elements and converts only the content inside <body>. The <title> element is not included by default. The resulting Markdown contains only the page's content elements without any structural HTML boilerplate.

HTML to Markdown Converter — Free Online Tool

Markdown has become the standard format for documentation, README files, blog posts, and note-taking applications. When content exists in HTML — in a CMS, a documentation system, or a legacy website — migrating it to Markdown by hand is tedious. This converter handles the translation automatically, preserving all semantic meaning while producing clean, readable Markdown output.

Why Convert HTML to Markdown?

HTML is verbose. A simple bold word requires opening and closing tags. A paragraph needs two tags. A heading needs a tag with a closing tag. An unordered list requires a parent <ul> and one <li> per item. The same content in Markdown is substantially more concise and far easier to write and read without a visual editor. Converting existing HTML content to Markdown makes it easier to store in version control, edit in any text editor, and process with static site generators.

CommonMark and GFM Support

This converter targets the CommonMark specification — the most widely supported Markdown standard — with extensions from GitHub Flavored Markdown (GFM) for tables and strikethrough. The output is compatible with GitHub, GitLab, Notion, Obsidian, Jekyll, Hugo, and all major Markdown processors. The pipe table format produced by this tool is the GFM table syntax supported by GitHub's README renderer and all major documentation platforms.

Handling Complex HTML

The converter processes the HTML using the browser's native DOM parser, which means it handles malformed HTML gracefully — just as a browser would. Unclosed tags, missing closing elements, and nested structures that don't strictly follow the spec are all handled correctly because the browser has already resolved the DOM tree before the Markdown conversion runs. This makes the tool reliable for real-world HTML from production websites, which often contains minor markup issues.

Tables

HTML tables are some of the most complex structures to convert to Markdown. The converter traverses the table structure, identifies header rows, body rows, and any alignment directives, and produces a properly formatted GFM pipe table. Tables with colspan or rowspan attributes — which have no Markdown equivalent — are converted with those attributes ignored, preserving as much content as possible in a flat table structure.