HTML to Markdown converter
Paste HTML, from a web page, an email or a CMS, and get tidy Markdown for free, ready for a README, a wiki, Obsidian or a static site. The conversion runs in your browser.
Free, no sign-up, no limit Runs in your browser: your text and files are never sent or saved.
HTML to Markdown
How to use it
- Paste HTML code, or content copied from a web page, Google Docs or Word (its formatting is converted), or try the example.
- Pick the heading style (# or underlined) and the bullet character.
- Copy the Markdown or download it as a .md file.
Example
Input
<h2>Getting started</h2>
<p>Install the <strong>CLI</strong>, then read the <a href="https://example.com/docs">documentation</a>.</p>
<ul>
<li>Fast</li>
<li>Free
<ul><li>No account needed</li></ul>
</li>
</ul>
<pre><code class="language-bash">npm install example-cli</code></pre>Output
## Getting started Install the **CLI**, then read the [documentation](https://example.com/docs). - Fast - Free - No account needed ```bash npm install example-cli ```
Good to know
- Tables become GFM tables: merged cells are split and nested tables are flattened into text.
- Colors, fonts, classes, forms and embedded media (video, iframe, SVG) have no Markdown equivalent and are dropped; only bold, italic and strikethrough set by inline styles are kept. Scripts and style sheets are ignored with their content.
- Links using javascript: or similar protocols are kept as plain text.
- The HTML is read as text, never run or displayed: nothing is sent to a server.
Frequently asked questions
How do I convert HTML to Markdown?
Paste the HTML code: the Markdown appears at once. Choose # headings or underlined ones (=== and ---) and the bullet character, then copy the result or download it as a .md file. Headings, bold, links, images, nested lists and code blocks with their language are kept.
How do I convert an HTML table to Markdown?
Paste the <table> code: it becomes a GitHub Flavored Markdown table with a header row and | separators. Markdown has no merged cells, so a cell spanning several columns is split, and a table nested inside another one is flattened into text.
Can I convert a whole web page to Markdown?
Yes, without fetching any URL: select the part you want on the page, copy it and paste it here, and its formatting is converted, as with Google Docs or Word. For the exact code, right-click, choose Inspect, then right-click the element, “Copy outerHTML”, and paste. Menus, forms, videos and scripts are dropped.
How do I convert HTML to Markdown with Python or pandoc?
With pandoc: pandoc -f html -t gfm page.html -o page.md. In Python, the markdownify package does it with markdownify(html). This page gives a similar result without installing anything, which is handy for a one-off snippet.
Can Markdown contain HTML?
Most Markdown renderers, GitHub included, accept raw HTML blocks, though GitHub strips scripts and styles. This converter goes the other way: it rewrites everything that has a Markdown equivalent and drops what has none, such as classes, colors, fonts or iframes.
Is the pasted HTML run or displayed?
No. The HTML is read as text and never executed or shown, so scripts and styles are ignored with their content, and javascript: links are kept as plain text. Nothing is sent to a server.