HTML to Markdown Converter
Paste HTML on the left. Get clean Markdown on the right — instantly, in your browser.
Supported HTML elements
h1–h6pstrong/bem/iaimgul/ol/liblockquotecodepre>codebrhrHTML to Markdown: Key Concepts
- Why convert HTML to Markdown?
- Markdown is more readable in source form, easier to version-control, and widely supported in CMSs (Ghost, Notion, GitHub, Obsidian). Converting legacy HTML content to Markdown makes it portable and maintainable.
- Markdown flavors
- CommonMark is the standardized Markdown spec. GitHub Flavored Markdown (GFM) extends it with tables, task lists, and strikethrough. This converter targets CommonMark-compatible output.
- Lossy conversion
- Markdown cannot represent all HTML. Inline styles, CSS classes, custom attributes, and complex table structures are dropped. If you need full fidelity, keep the original HTML.
Frequently Asked Questions
What HTML elements does this converter support?
The converter handles headings (h1–h6), paragraphs, bold (strong/b), italic (em/i), links (a), images (img), unordered and ordered lists (ul/ol/li), blockquotes, inline code, fenced code blocks (pre>code), horizontal rules (hr), and line breaks (br). Unsupported elements like div, span, table, and custom attributes are stripped, with their text content preserved.
Why does the Markdown output drop my CSS classes and inline styles?
Markdown has no concept of CSS classes or inline styles — it is a plain-text format. When you convert HTML to Markdown, any styling information is intentionally removed. The output preserves structure (headings, lists, emphasis) but not visual appearance. If you need styled output, keep the original HTML or use a rich-text format like DOCX instead.
Can I convert Markdown back to HTML?
This tool converts one direction only — HTML to Markdown. To convert Markdown to HTML, use a Markdown parser like marked.js, remark, or the Markdown Editor on this site. Most static site generators and CMSs (Jekyll, Hugo, Ghost, Notion) also render Markdown to HTML automatically.
Will this tool work on large HTML files?
Yes — conversion runs entirely in your browser with no file size limits imposed by a server. For very large files (100KB+), the browser may take a moment to process. The converter is regex-based and linear in complexity, so performance scales with the input size. Extremely large files (several MB) may cause a brief pause on slower devices.
What is the difference between CommonMark and GitHub Flavored Markdown?
CommonMark is the standardized Markdown specification that defines consistent parsing rules. GitHub Flavored Markdown (GFM) extends CommonMark with tables, strikethrough (~~text~~), task list checkboxes (- [ ]), and autolinks. This converter targets CommonMark-compatible output, which is supported by every Markdown renderer. GFM-specific elements like tables are stripped to plain text.