HTML to Markdown Converter
Convert HTML code to clean Markdown syntax. Preserves headings, links, lists, images, bold, italic, and code formatting.
HTML to Markdown Converter tool
Example
Input: <h2>Title</h2><p>Visit <a href="https://example.com">our site</a> for <strong>more</strong>.</p>
Result: ## Title / (blank line) / Visit [our site](https://example.com) for **more**.
An h2 becomes a ## heading, links become [text](url) and strong text is wrapped in double asterisks.
HTML Elements and Their Markdown
| HTML | Markdown |
|---|---|
| <h2>Title</h2> | ## Title |
| <strong>bold</strong> | **bold** |
| <em>italic</em> | _italic_ |
| <del>old</del> | ~~old~~ |
| <a href="https://example.com">site</a> | [site](https://example.com) |
| <img src="cat.png" alt="cat"> |  |
| <code>x = 1</code> | `x = 1` |
| <ul><li>one</li><li>two</li></ul> | - one / - two |
| <ol><li>one</li><li>two</li></ol> | 1. one / 2. two |
| <blockquote>quote</blockquote> | > quote |
| <hr> | * * * |
| <span style="color:red">red</span> | red |
| <p>5 < 6 & 7</p> | 5 < 6 & 7 |
| <script>alert(1)</script> | (removed) |
A slash marks a line break in the Markdown output.
- Paste the HTML you want to convert into the left panel.
- Read the Markdown that appears at once in the right panel.
- Edit the Markdown directly if needed - your changes are turned back into HTML on the left.
- Check that headings, links, lists and formatting came through as expected.
- Click the copy button to copy the Markdown for your docs or editor.
Turning HTML Back Into Clean Markdown
This converter turns HTML into Markdown. Paste part of a web page, a CMS export or an email template, and you get clean Markdown back. An h2 becomes ##, strong text becomes **text**, links become [text](url) and simple tables become pipe tables.
It is handy when you move content from a website or blog into a Markdown system, such as a static site generator like Hugo or Jekyll, a docs tool, Obsidian or a GitHub README. Markdown files are small, easy to read in any text editor and simple to track with version control.
Anything Markdown cannot show is dropped, but its text is kept. Classes, inline styles and div or span wrappers disappear, so a red span becomes plain text. Scripts, styles, iframes and embeds are removed along with their contents. Entities such as & and < are turned back into & and <. Characters that would trigger Markdown by accident, like a * at the start of a line, are escaped with a backslash.
The output uses # headings, - for bullets, _ for italics and fenced ``` code blocks. Merged cells and nested tables do not survive the trip to a pipe table. Edit the Markdown panel and the HTML side updates, using the same engine as our Markdown to HTML Converter. To tidy leftover entities in raw HTML, use HTML Entity Encode and Decode.
Sources
Frequently Asked Questions
Related Tools
Markdown to HTML Converter
Convert Markdown text to clean, semantic HTML. Supports headings, lists, links, images, code blocks, tables, and more.
Text and WritingMarkdown to PDF
Convert Markdown documents to styled, downloadable PDF files. Supports headings, lists, code blocks, and tables.
File ConvertersWord to Text Extractor
Extract plain text content from .docx Word documents directly in your browser using mammoth.js. No server upload needed.
File ConvertersFind and Replace
Find and replace text with regular expressions, capture groups, case-sensitive matching, and a live match count.
Text and Writing