Convert HTML code to clean, readable Markdown instantly. Supports headings, tables, code blocks, links, images, and lists. GitHub, CommonMark, and Basic Markdown flavors — live preview, no sign-up.
An HTML to Markdown converter transforms HTML markup into Markdown syntax — the lightweight plain-text formatting language used in README files, documentation platforms, wikis, static site generators, and content management systems. While HTML is verbose and meant to be rendered by browsers, Markdown is human-readable in its raw form and is the standard input format for platforms like GitHub, GitLab, Notion, Confluence, Obsidian, and Gatsby.
The most common need for this conversion arises when migrating content from a CMS or website into a documentation platform, when exporting blog posts from WordPress to a static site generator like Hugo or Jekyll, when pasting HTML email content into a Markdown-based wiki, or when cleaning up copied webpage text for use in a developer README.
Our converter handles all standard HTML structures — headings (H1–H6), paragraphs, bold/italic/strikethrough text, links with titles, images, ordered and unordered lists, blockquotes, fenced code blocks with language detection, and full HTML tables — and outputs clean, properly formatted Markdown with optional syntax highlighting.
| HTML Element | Markdown Output | Example |
|---|---|---|
| <h1> – <h6> | # to ###### | <h2>Title</h2> → ## Title |
| <p> | Paragraph with blank line | <p>Text</p> → Text\n\n |
| <strong>, <b> | **bold** | <strong>hi</strong> → **hi** |
| <em>, <i> | *italic* | <em>hi</em> → *hi* |
| <del>, <s> | ~~strikethrough~~ | <del>old</del> → ~~old~~ |
| <code> | `inline code` | <code>var</code> → `var` |
| <pre><code> | ```fenced block``` | Preserves language class |
| <a href> | [text](url "title") | Title attribute supported |
| <img src> |  | Alt and title preserved |
| <ul><li> | - list item | Nested lists supported |
| <ol><li> | 1. numbered item | Sequential numbering |
| <blockquote> | > quoted text | Nested blockquotes |
| <table> | | col | col |\n|---|---| | GFM table format |
| <br> | \n line break | With preserveLineBreaks on |
| <hr> | --- horizontal rule | Thematic break |
The most widely-used Markdown dialect. Extends CommonMark with tables (| col | col |), strikethrough (~~text~~), task lists (- [x] item), fenced code blocks with syntax highlighting, and @mentions. Use this for GitHub, GitLab, Bitbucket READMEs, and any platform that explicitly supports GFM.
Best for: GitHub, GitLab, Bitbucket, GitHub Pages, VS Code
The standardized Markdown specification that resolves ambiguities in the original Markdown syntax. Defines precise rules for all core elements. Does not include GFM extensions like tables or strikethrough. Use this when targeting platforms that advertise CommonMark compliance.
Best for: Discourse, Ghost (default), Hugo, Eleventy
Core Markdown only — the original specification from John Gruber (2004). Headings, bold, italic, links, images, lists, blockquotes, and code. No tables, no strikethrough, no extensions. Use for the widest possible compatibility with legacy systems or minimal Markdown parsers.
Best for: Simple blog platforms, email systems, legacy CMS
Migrating content from WordPress to Hugo, Jekyll, Gatsby, Astro, or Next.js? Export your WordPress posts as HTML and convert them to Markdown files that your static site generator can process. The converter preserves your heading hierarchy, formatting, links, and images.
When documenting a software project, you may have existing HTML documentation in a CMS or internal wiki. Convert it to Markdown for your GitHub README, GitLab wiki, or Bitbucket documentation where Markdown is the native format.
HTML email templates often contain product descriptions, feature lists, and announcements that need to be repurposed into documentation or blog posts in Markdown format. The converter strips email-specific inline styles while preserving content structure.
Both Notion and Confluence accept Markdown input. When copying web page content to these platforms, converting HTML to Markdown first ensures clean structure without residual HTML tags, inline styles, or malformed formatting.
If your API documentation is in an HTML-based system (like Swagger UI export, ReadTheDocs HTML, or a legacy HTML documentation site), convert it to Markdown for modern documentation platforms like GitBook, Docusaurus, or MkDocs.
When syndicating blog content across platforms like Dev.to, Hashnode, and Medium (which all accept Markdown), convert your HTML source posts to Markdown to avoid formatting issues from pasting raw HTML.
The converter supports all standard structural HTML elements: headings (H1–H6), paragraphs, text formatting (bold, italic, strikethrough, inline code), links (with title attribute), images (with alt and title), ordered and unordered lists, blockquotes, pre/code blocks (with language class detection), horizontal rules, and HTML tables. Unsupported elements pass their text content through without markup.
When you have a <pre><code class="language-javascript"> element (the format used by highlight.js, Prism.js, and most syntax highlighters), the converter extracts the language name from the class attribute and uses it as the fenced code block language identifier: ```javascript. This preserves syntax highlighting when the Markdown is rendered.
No — inline styles (style="color:red") are not converted to Markdown because Markdown does not have a concept of colors or custom fonts. The text content of styled elements is preserved, but the styling itself is dropped. For complex styled HTML, you may need to manually reformat after conversion.
When Live Preview is enabled, the converter runs automatically 300ms after you stop typing, giving you real-time feedback. Disable it if you're pasting very large HTML documents and want to control exactly when conversion runs. In manual mode, click 'Convert to Markdown' to trigger conversion.
Yes — the Tables toggle enables HTML table conversion to GitHub Flavored Markdown table format. An HTML table with thead and tbody is converted to the pipe-separated | col | col | format with a header separator row. Note that Markdown tables require CommonMark or GFM — Basic Markdown does not support tables.
Different Markdown parsers have different rules. If your converted Markdown renders differently than expected, check: (1) the flavor setting matches your target platform, (2) tables require GFM flavor, (3) strikethrough requires GFM, (4) nested lists may need consistent indentation. Always preview your Markdown on the target platform after conversion.
Discover more free developer tools that might interest you
Convert text between upper, lower, title cases and more
Generate placeholder text for design and content
Test and validate regular expressions
Format and validate JSON data
View JSON data in a tree structure
Minify JSON data to reduce size