HTML to Markdown

Convert HTML content to Markdown syntax, preserving structure and formatting for documentation and content migration.

100% client-side No signup Free forever
// how to use

How to Use HTML to Markdown

  1. Paste HTML code in the left panel
  2. See the Markdown output update automatically
  3. Review the converted Markdown
  4. Copy the result for use in your projects
// features

Features

  • Automatic conversion
  • Preserves document structure
  • Handles nested elements
  • Table conversion
  • Code block support
  • Link and image conversion
  • Clean output formatting
// about

About HTML to Markdown

Converting HTML to Markdown is essential when migrating content to Markdown-based systems, creating documentation from web pages, or simplifying formatted content. Our converter preserves document structure while producing clean Markdown syntax.

Conversion Mapping

  • Headings: <h1>-<h6> become # through ######
  • Emphasis: <em>/<i> to *italic*, <strong>/<b> to **bold**
  • Lists: <ul>/<ol> to - or 1. numbered lists
  • Links: <a href="..."> to [text](url) format
  • Images: <img src="..."> to ![alt](src)
  • Code: <code> and <pre> to backtick notation

Handling Complex HTML

Not all HTML elements have Markdown equivalents. Tables, complex nesting, and certain formatting may simplify or require alternate representation. Our converter handles common patterns intelligently while preserving content integrity.

Content Migration

Moving from WordPress to static site generators, creating README files from web docs, or importing content to documentation platforms often requires HTML-to-Markdown conversion. Our tool streamlines these migrations.

// faq

Frequently Asked Questions

Why convert HTML to Markdown?
Reasons include: creating documentation from web content, migrating CMS content to Markdown-based systems (Jekyll, Hugo), making content more portable, simplifying formatting for editing, creating clean text versions of web pages, and converting WYSIWYG editor output to clean Markdown.
What HTML elements are converted?
We convert: headings (h1-h6→#), paragraphs, emphasis (em/i→*, strong/b→**), links, images, lists (ul, ol), blockquotes, code elements, tables, horizontal rules, and more. Unknown or complex HTML is preserved or simplified to text based on your preference.
How are nested or complex structures handled?
Nested lists, quotes within quotes, and complex structures are converted recursively. We maintain proper indentation for nested elements. Some HTML-specific features (like colspan in tables) may require manual adjustment since Markdown has simpler syntax.
What happens to inline styles and classes?
By default, inline styles and classes are stripped since Markdown doesn't support them. You can optionally preserve important styling as HTML within the Markdown output, or configure rules for specific class-to-syntax mappings (e.g., class="highlight"→backticks).
Can I convert entire web pages?
Yes! Paste full HTML or enter a URL. The converter extracts the main content, stripping navigation, scripts, styles, and boilerplate. Options let you include or exclude images, choose heading levels, and handle links. Great for archiving web content as Markdown.
How do I handle images with complex attributes?
Basic images convert to ![alt](src). Complex attributes (width, height, alignment) are either stripped, preserved as HTML, or converted to HTML within Markdown (depending on your settings). For full control over image sizing, using raw HTML in Markdown is often necessary.