Paste HTML code, or copy formatted text from a web page, Google Docs, Word or an email and paste it in. You get clean Markdown instantly, with GitHub-style tables, task lists and code blocks, plus a live preview.
Last updated:
Markdown style options
Converts automatically as you type or paste. Nothing is uploaded.
Advertisement
Advertisement
How to use the HTML to Markdown Converter
Add your content. Paste HTML code into the HTML code box, upload an .html file, or switch to Rich text and paste formatted text copied from a web page, Google Docs or Word.
Read the Markdown on the right. It updates as you type or paste.
Adjust the style if your project has conventions: # or underlined headings, - or * bullets, fenced or indented code, inline or reference links.
Check the Preview tab to see how the Markdown renders.
Copy or download the result as a .md file.
HTML to Markdown cheat sheet
HTML
Markdown
<h2>Title</h2>
## Title
<strong>bold</strong>, <em>italic</em>
**bold**, _italic_
<a href="https://example.com">link</a>
[link](https://example.com)
<img src="a.png" alt="Logo">

<ul><li>One</li></ul>
- One
<ol><li>First</li></ol>
1. First
<blockquote>Quote</blockquote>
> Quote
<code>x = 1</code>
`x = 1`
<pre><code class="language-js">
```js fenced block
<del>old</del>
~~old~~ (GitHub)
<hr>
---
<br>
Two spaces at the end of the line
When converting to Markdown is useful
Moving content from a CMS such as WordPress into a static site generator (Hugo, Jekyll, Astro, Docusaurus) that stores pages as .md files.
Writing documentation: turn an existing help page or a Google Doc into a README or a wiki page on GitHub or GitLab.
Note-taking: save web articles in Obsidian, Notion or another Markdown-based notes app with headings and links intact.
Prompting AI tools: Markdown is compact and keeps structure, so pasted web content uses fewer tokens than raw HTML.
Select the part of the page you want in your browser, copy it, and paste it into either input box. The formatting (headings, links, lists, tables, bold and italic) comes across as HTML and is converted to Markdown. You can also view the page source, copy the HTML and paste it into the HTML code box.
Can I convert Google Docs to Markdown?
Yes. Copy the text in Google Docs and paste it into the Rich text box. Headings, lists, links, tables, bold, italic and strikethrough are converted. Google Docs styling such as fonts and colours is ignored because Markdown has no equivalent.
How are HTML tables converted?
With the GitHub tables option on, simple tables become Markdown pipe tables. The first row becomes the header, and align or text-align settings become :--- , :---: or ---: alignment markers. Line breaks inside cells become <br>. Tables that contain other tables are kept as HTML because Markdown tables cannot nest.
What happens to tags Markdown does not support?
Scripts, styles and form controls are removed. Tags such as <u>, <sup>, <sub> and <iframe> are reduced to their text, or kept as raw HTML if you tick the option to keep them, since most Markdown renderers accept inline HTML.
Which Markdown flavour is produced?
CommonMark-compatible Markdown, plus GitHub Flavored Markdown extensions (tables, task lists and ~~strikethrough~~) when the GitHub option is on. Special characters such as * and _ in normal text are escaped so they are not misread as formatting.
Is my HTML sent to a server?
No. The conversion runs entirely in your browser using its built-in HTML parser. Scripts in the pasted HTML are never run.
Are all the tools on FreeToolCabin tested for quality and accuracy?
Yes! Every tool on our site undergoes automated Q/A testing in real browser environments to ensure high precision, correct output, and zero errors. If you happen to spot a bug or have a suggestion, please contact us at [email protected] and our team will review it right away.