Convert HTML to Markdown in seconds. Paste an HTML fragment or a complete HTML page and this HTML to Markdown converter turns headings, paragraphs, bold and italic text, links, images, nested lists, blockquotes, code blocks and tables into clean, readable Markdown. Scripts, styles, forms and other elements without a Markdown equivalent are removed automatically. Copy the result or download it as a .md file for GitHub, README files, documentation, blogs or any Markdown editor. Everything runs client-side in your browser โ your HTML is never uploaded to a server.
The HTML to Markdown converter turns HTML markup into clean, readable Markdown syntax while keeping the structure and useful formatting of the original content. Headings stay headings, lists stay lists, links and images keep their URLs, and tables and code blocks are converted to their Markdown equivalents. The result is Markdown you can paste straight into GitHub, a README file, documentation, a CMS or any Markdown editor.
HTML is the markup language of web pages. Markdown is a lightweight text format that is much easier to read and edit and is used by GitHub, GitLab, Bitbucket, static site generators, documentation platforms, note-taking apps and many CMS systems.
An HTML to Markdown converter reads the HTML tags and rewrites them as Markdown syntax: <h2> becomes ##, <strong> becomes **bold**, <a href> becomes [text](url), and so on.
Typical situations where you need to convert HTML to Markdown:
HTML input:
<h2>Hello <strong>world</strong></h2>
<p>This is a <a href="https://example.com">link</a>.</p>
<ul>
<li>One</li>
<li>Two</li>
</ul>
Markdown output:
## Hello **world**
This is a [link](https://example.com).
- One
- Two
Table example:
<table>
<thead><tr><th>Name</th><th>Role</th></tr></thead>
<tbody><tr><td>Alice</td><td>Developer</td></tr></tbody>
</table>
| Name | Role |
| ----- | --------- |
| Alice | Developer |
<h1> โ <h6> โ # to ###### headings<p> โ paragraphs separated by a blank line<strong>, <b> โ **bold**; <em>, <i> โ *italic*; <del>, <s> โ ~~strikethrough~~<a> โ [link text](URL) and <img> โ , including title attributes<ul>, <ol>, <li> โ bulleted and numbered lists, including nested lists<blockquote> โ lines starting with ><code> โ inline code and <pre><code> โ fenced code blocks (language classes such as language-js are kept)<hr> โ --- and <br> โ Markdown line breaks<table> with <thead>, <tbody>, <tr>, <th> and <td> โ Markdown tables&, <, >, " and are decoded to normal characters
Elements without a useful Markdown equivalent are removed during conversion: <script>, <style>, <noscript>, <iframe>, <svg>, <form>, <input>, <button> and the <head> of a full page.
Attributes such as class, id, style and data-* are ignored, while relevant attributes like href, src, alt and title are kept.
Wrapper elements such as <div>, <section> and <span> disappear but their content is preserved, so the converter produces clean Markdown instead of a tag-for-tag replacement.
<head>, scripts and styles and converts the visible body content.colspan/rowspan) are flattened, because Markdown tables do not support merged cells.``` fences.*, _ and [) are escaped in normal text so your content renders exactly as intended.The HTML to Markdown conversion runs entirely in your browser using JavaScript. Your HTML is never uploaded to the WebTextTools server, which makes the tool safe for internal documentation, draft articles and confidential content.
Paste your HTML above and get clean Markdown instantly. Copy the result or download it as a .md file for GitHub, README files, documentation or your favourite Markdown editor.