HTML to Markdown Converter — Free Online Tool
The free HTML to Markdown Converter turns HTML source into clean, ready-to-use Markdown instantly — with a live side-by-side view, one-click copy, and zero external dependencies. Everything runs in your browser; nothing is sent to a server.
Why Convert HTML to Markdown?
HTML was designed for browsers — it is precise, machine-readable, and capable of expressing rich structure. But it is not pleasant to write or read as plain text. A paragraph with formatting in HTML looks like this:
<p>The package ships <strong>Tuesday</strong> — check your <a href="...">order status</a>.</p>The same content in Markdown:
The package ships **Tuesday** — check your [order status](...).Markdown is version-controllable as meaningful plain text, writable without a GUI tool, and readable without rendering. Converting HTML to Markdown becomes necessary when:
- Migrating blog posts from WordPress or a legacy CMS into a Markdown-native system (Ghost, Jekyll, Hugo, Docusaurus)
- Importing web articles or documentation into a knowledge base that accepts Markdown (Notion, Obsidian, Confluence)
- Cleaning up rich-text content exported from Google Docs or Notion for version control as plain text
- Extracting readable content from HTML emails or web pages for offline editing
- Converting WYSIWYG-generated HTML into source-controlled documentation
How to Use the Converter
- Open the HTML to Markdown Converter. A sample document is pre-loaded so the conversion is visible immediately
- Replace the sample with your own HTML in the left panel. The Markdown output updates live in the right panel
- Review the output. Line and character counts appear below each panel
- Click Copy Markdown to copy the full output to your clipboard
Supported HTML Elements
| HTML Input | Markdown Output | Notes |
|---|---|---|
<h1> through <h6> | # through ###### | ATX heading style with matching number of hashes |
<strong>, <b> | **bold** | Both tags produce the same output |
<em>, <i> | *italic* | Both tags produce the same output |
<del>, <s> | ~~strikethrough~~ | GFM extension syntax |
<code> | `inline code` | Backtick wrapping |
<pre><code> | Fenced code block | Language class from class attribute, if present |
<ul><li> | - item | Hyphen prefix; nested lists indented with spaces |
<ol><li> | 1. item | Ordered; numbers reset from 1 |
<blockquote> | > text | Nested blockquotes with multiple >> prefixes |
<a href="url">text</a> | [text](url) | title attribute converted to [text](url "title") |
<img src="url" alt="alt"> |  | Image alt text preserved |
<hr> | --- | Horizontal rule |
<p> | Paragraph with blank line | Double newline separation between blocks |
<br> | Two trailing spaces + newline | Markdown line break syntax |
What Cannot Be Represented in Markdown
Markdown is intentionally limited in scope — it covers the most common formatting needs but deliberately does not support everything HTML can express. When converting HTML to Markdown, these elements are handled as follows:
| HTML Element | What Happens in Conversion |
|---|---|
Inline colors (style="color:red") | Color stripped; text content preserved |
| Font size and family | Stripped; text content preserved as-is |
Text alignment (text-align: center) | Stripped; Markdown has no alignment syntax for body text |
| Tables | Converted to GFM pipe table syntax (supported by GitHub and most modern renderers) |
| Colspan / rowspan in tables | Cannot be represented in Markdown — cells merged; content preserved in first cell |
<span>, <div> | Tags stripped; text content preserved inline |
| Nested lists (more than 2 levels) | Indented with spaces; compatibility varies by Markdown renderer |
| Script and style tags | Stripped entirely (content not preserved) |
Advanced Workflows
WordPress to Ghost or Hugo migration
When migrating from WordPress to a Markdown-native CMS or static site generator:
- Export posts from WordPress as XML (Tools → Export → All content)
- Use a WordPress XML parser to extract the HTML content of each post
- Paste each post's HTML content into the converter and copy the Markdown output
- Save each post as a
.mdfile with the appropriate front matter (title, date, slug, categories) - Import into Ghost using the Ghost CLI, or into Hugo/Jekyll as Markdown posts in the content directory
For large migrations (hundreds of posts), this workflow is best automated with a script that calls a server-side Markdown conversion library (Turndown for Node.js, html2text for Python) rather than pasting each post manually.
Google Docs to static site generator
Google Docs exports to HTML via File > Download > Web Page (.html, zipped). The exported HTML includes inline styles and Google-specific markup. Paste the document body content (between the <body> tags) into the converter. The converter strips inline styles, Google font references, and script tags, leaving clean semantic Markdown. Images link to Google's servers and will need to be downloaded and re-hosted separately.
Email HTML to Markdown
HTML emails contain heavy inline styles, table-based layouts, and tracking pixels. Paste the email body HTML into the converter to extract the readable text content as clean Markdown — useful for saving newsletters into a notes app, Obsidian, or any Markdown-compatible knowledge base. Tables in email HTML are typically layout tables (not data tables) and will not convert meaningfully — expect the readable text to be extracted rather than a perfect structural match.
Round-trip verification
After converting HTML to Markdown, paste the output into the Markdown to HTML Converter to convert it back to HTML. Comparing the original HTML against the round-tripped output reveals any elements that have no direct Markdown equivalent — these are the parts that need manual editing or workarounds after the conversion.
Diffing HTML changes as Markdown
When reviewing changes between two versions of an HTML document, convert both to Markdown first, then paste both strings into the Diff Checker. Markdown diffs are far more readable than raw HTML diffs because all the tag noise is removed — only the content changes are visible. This is particularly useful for content review workflows where non-technical reviewers need to read the diff.
The Version Control Advantage of Markdown
HTML is notoriously difficult to version control in a meaningful way. Git diffs on HTML files show changes including tag wrappers, attribute changes, and whitespace — making it hard to see what content actually changed. Markdown files produce clean, human-readable diffs: a changed paragraph shows as the old paragraph replaced by the new one, with no surrounding tag noise. This is a major reason developer documentation, technical blogs, and specification documents are increasingly stored as Markdown rather than HTML.
Frequently Asked Questions
Does the converter need an internet connection to work?
Only to load the page initially. Once loaded, conversion runs entirely in your browser using a JavaScript HTML-to-Markdown parser. No network requests are made during conversion — it works offline after first load.
What happens to HTML tags that have no Markdown equivalent?
Tags like <span>, <div>, and inline style attributes are stripped; their text content is preserved in the output. Tables are converted to GFM pipe table syntax. Colspan and rowspan cannot be represented in Markdown — those cells are merged and their content preserved in the nearest cell.
Is there a file size or character limit?
No enforced limit. The parser processes text synchronously in the browser. Very large HTML documents (hundreds of thousands of characters) may cause a brief UI lag on older devices. Typical blog post or documentation page HTML converts instantly.
What is the difference between HTML to Markdown and Markdown to HTML conversion?
HTML to Markdown converts structured web markup into readable plain text syntax — used when migrating content to Markdown-native systems or for version control. Markdown to HTML converts readable shorthand into browser-renderable markup — used when embedding Markdown content in HTML-based systems. Both converters are available on this site and work in the browser with no server uploads.
Convert Your HTML Now
Paste HTML on the left, copy Markdown on the right. Instant, free, no signup.
Open HTML to Markdown Converter