Convert HTML to Markdown Online
The Tools Kit’s free HTML to Markdown converter turns HTML markup into Markdown syntax right in your browser. Paste a snippet or upload an HTML file and the Markdown appears beside it as you type: headings become # lines, bold and italic tags become asterisks, links and images become Markdown link and image syntax, and leftover tags are stripped away.
It is built for quick, everyday conversions, such as moving a formatted snippet into a README, a Markdown note or a static-site post. Nothing is uploaded: the conversion runs locally, so it is safe to use on drafts and internal docs. Need the opposite direction? The Markdown to HTML converter turns Markdown back into markup.
How to Convert HTML to Markdown
- 1
Paste or upload your HTML
Paste HTML into the HTML Input box, or drop a .html, .htm or .txt file onto the upload area above it to load the file’s contents into the box.
- 2
Read the live Markdown output
The Markdown Output panel updates as you type. There is no Convert button: every edit to the HTML is converted immediately.
- 3
Check the result
Skim the output for elements the converter strips rather than rebuilds, such as lists, tables, blockquotes and h4 to h6 headings, and tidy those by hand.
- 4
Copy the Markdown
Click Copy Markdown to put the result on your clipboard, then paste it into a README, docs page, note or Markdown-based CMS. Use Clear to start again.
No account is needed, and you can convert as many snippets as you like.
What HTML Tags Become in Markdown
The converter recognizes a fixed set of common elements and maps each one to its Markdown equivalent. Attributes such as class, id and style are dropped.
| HTML | Markdown output |
|---|---|
<h1>, <h2>, <h3> | #, ##, ### headings |
<strong>, <b> | **bold** |
<em>, <i> | *italic* |
<code> | `inline code` |
<a href="url">text</a> | [text](url) |
<img alt="x" src="url"> |  |
<br> | A line break |
<hr> | --- (horizontal rule) |
<p> | The paragraph text followed by a blank line |
& < > " | A space, &, <, > and " |
Any other tag | Removed; the text inside it is kept |
Entities beyond those five, such as numeric codes or ©, pass through unchanged. If your source is full of them, decode it first with the HTML entity encoder and decoder.
HTML to Markdown Example
This HTML input:
<h2>Install</h2>
<p>Run <code>npm install</code> and read the <a href="https://example.com/docs">docs</a>.</p>
<p>Tom & Jerry <b>rock</b></p>produces exactly this Markdown:
## Install
Run `npm install` and read the [docs](https://example.com/docs).
Tom & Jerry **rock**The h2 becomes a ## heading, the code element becomes backticks, the link keeps its URL in parentheses, & and are decoded, and b becomes **bold**. Each closing paragraph adds a blank line on top of the line breaks already in your source, so you may see an extra empty line you can delete.
Limitations to Know Before You Convert
This is a lightweight pattern-based converter, not a full HTML parser, so a few structures need a manual touch afterward:
- Lists and tables — tags are stripped and the text stays, but there are no list dashes or table pipes. Rebuild a table quickly with the Markdown table generator.
- h4 to h6, blockquote and pre — reduced to plain text; code inside pre becomes inline backticks rather than a fenced block.
- Multi-line elements — a paragraph, heading or link whose opening and closing tags sit on different lines is stripped instead of converted. Keep each paragraph, heading and link on one line for the best result.
- Links and images — links need a double-quoted href, and images need alt written before src. Check for a stray > after converted images.
- Similar tag names and attributes — the bold and italic patterns can also match <br> and <img>, so a line break followed later on the same line by bold text, or an image followed by italic text, can lose the break or image. A <br> or <hr> with attributes (such as class) is stripped rather than converted.
- Scripts and styles — their contents are not removed, so paste the article body rather than the whole page.
To see exactly what changed between the original and your cleaned-up version, paste both into the text compare tool.
Common uses
- Turning HTML copied from a CMS or rich-text editor into Markdown for a GitHub README
- Moving blog posts into a Markdown-based static site generator
- Pasting formatted snippets into Markdown note apps and wikis
- Stripping most tags from an HTML email or export to get readable text with links intact
- Preparing content for docs, where a document’s text can also come from the PDF to Markdown converter
Once you have clean Markdown, the word counter gives a quick length check, and the rest of the conversion tools cover JSON, CSV, XML and more.
HTML and Markdown terms explained
| Term | What it means here |
|---|---|
| HTML | HyperText Markup Language, the tag-based markup browsers render, such as <p>, <h2> and <a> |
| Markdown | A plain-text formatting syntax that uses characters like #, ** and [ ]( ) instead of tags, readable even before it is rendered |
| HTML entity | A coded stand-in for a reserved or special character, such as & for & or for a non-breaking space |
| Inline code | A short code fragment wrapped in single backticks in Markdown, the equivalent of an HTML <code> element |
| Alt text | The alt attribute of an image, which becomes the text inside the brackets of Markdown image syntax |
| Tag stripping | Removing HTML tags while keeping the text between them, which is what happens to elements this tool does not map |
Frequently Asked Questions
Paste your HTML into the HTML Input box or upload a .html, .htm or .txt file. The Markdown appears instantly in the output panel, and Copy Markdown copies it to your clipboard. There is no Convert button because the conversion runs live as you type.
Yes. It is free to use with no account, no signup and no limit on how many times you convert.
No. The conversion runs entirely in your browser with JavaScript. Uploaded files are read locally, so neither pasted HTML nor file contents are sent to a server.
h1, h2 and h3 headings, strong and b (bold), em and i (italic), code (inline backticks), links with a double-quoted href, images whose alt attribute comes before src, br, hr and p. Every other tag is removed and its text is kept.
No. ul, ol, li and table tags are stripped, so the item and cell text remains but without list markers or table pipes, and adjacent items can run together. Add the dashes or numbers by hand, or rebuild a table with a Markdown table generator.
No. Only h1 to h3 become #, ## and ###. h4, h5 and h6 tags are stripped and their text is left as a plain line, so add #### or more yourself if you need them.
Links are converted only when the href value uses double quotes, and images only when the alt attribute is written before src. An img tag with src first or no alt is removed entirely, and a link with a single-quoted href keeps just its text. An image followed by an i (italic) element on the same line can also be swallowed by the italic rule, so put images on their own line. After a converted image, check for a stray > character and delete it.
Paired tags such as p, h2, strong and a are matched only when the opening and closing tags sit on the same line. If a paragraph or heading is wrapped across lines, its tags are stripped instead of converted, so the text survives without the Markdown formatting or blank line.
Five: becomes a space, and &, <, > and " become &, <, > and ". Numeric entities such as ' and named ones like © are left unchanged in the output.
You can paste a full page’s HTML, but the tool does not fetch URLs and does not remove script or style blocks, so their contents appear as text in the output. Pasting just the article or content section gives a much cleaner result.
Not with this tool, which only converts in one direction. Use the separate Markdown to HTML converter to turn Markdown back into HTML markup.
Reviewed by Raja Jahangir · Last reviewed: October 2026
How do you convert HTML to Markdown?
To convert HTML to Markdown, paste the HTML or upload a .html, .htm or .txt file and the Markdown appears instantly. Headings h1 to h3 become #, ## and ###, bold and italic tags become ** and *, code becomes backticks, and links with a double-quoted href become [text](url). Lists, tables and other tags are stripped, keeping their text.
Runs in your browser. Your files and text never leave your device - nothing is uploaded.
