HTML to Markdown
Convert HTML to Markdown
About This Tool
The HTML to Markdown Converter transforms HTML code into clean, readable Markdown syntax. Markdown is widely used for documentation, README files, blogs, and content management systems.
Paste your HTML and get properly formatted Markdown instantly. Preserves headings, links, images, lists, code blocks, and other formatting.
How It Works
How to Use This Converter
Converting HTML to Markdown is easy:
- Paste HTML - Enter your HTML code in the input area.
- Click Convert - The tool processes your HTML instantly.
- Review output - Check the generated Markdown in the output area.
- Copy or download - Get your Markdown ready to use.
Formula
Conversion Rules
HTML to Markdown mappings:
- <h1> becomes # Title
- <h2> becomes ## Subtitle
- <p> becomes plain text
- <strong> becomes **Bold**
- <em> becomes *Italic*
- <a href="url"> becomes [Link](url)
- <img> becomes 
- <ul><li> becomes - Item
- <ol><li> becomes 1. Item
- <code> becomes `code`
- <blockquote> becomes > quote
Examples
Examples
Example 1: Basic Formatting
HTML: <h1>Welcome</h1><p>This is <strong>bold</strong> and <em>italic</em>.</p>
Markdown: # Welcome / This is **bold** and *italic*.
Example 2: Links and Images
HTML: <a href="https://example.com">Visit</a>
Markdown: [Visit](https://example.com)
Frequently Asked Questions
How do I convert HTML to Markdown?
Paste HTML content and the converter produces clean Markdown. <h1> becomes #, <strong> becomes **, <a href> becomes [text](url), <ul><li> becomes - items. Complex HTML is simplified to readable Markdown.
What HTML elements are supported?
Headings (h1-h6), paragraphs, bold, italic, links, images, lists (ordered and unordered), blockquotes, code blocks, tables, and horizontal rules. Unsupported elements are stripped or converted to their text content.
How are HTML tables converted to Markdown?
Tables become pipe-delimited Markdown tables with header separators. Complex tables with colspan/rowspan are simplified to basic grid format. The converter preserves cell content and alignment where possible.
Can I convert a web page to Markdown?
Paste the HTML source of any web page. The converter strips navigation, scripts, and styles, extracting only the content. This is useful for migrating web content to Markdown-based systems like Jekyll, Hugo, or documentation sites.
Which Markdown flavor does the converter use?
The converter outputs GitHub Flavored Markdown (GFM) by default, which supports tables, task lists, and fenced code blocks. You can also choose CommonMark or original Markdown syntax for compatibility with different platforms.
Disclaimer
Disclaimer: This tool provides automated conversion that handles most common HTML elements. Complex HTML structures, custom classes, or non-standard markup may require manual adjustment. All processing happens in your browser; no data is transmitted to any server. Always verify the output accuracy before use.
💡 Tips
Tips
- Clean up unnecessary HTML tags before converting
- Review output for any formatting issues
- Some complex HTML may need manual adjustment
- Use for migrating content to Markdown-based systems
- Great for converting web content to documentation