Conversion Tools

HTML to Markdown

This free HTML to Markdown converter turns HTML into Markdown live in your browser as you paste or type, or from an uploaded .html, .htm or .txt file. It maps h1-h3 headings, bold, italic, inline code, links, images, line breaks, rules and paragraphs to Markdown and strips other tags. Nothing is uploaded to a server.

Upload HTML file
Click or drag & drop · .html, .htm, .txt
# Hello World This is **bold** and *italic*.

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. 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. 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. 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. 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.

HTMLMarkdown 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">![x](url)
<br>A line break
<hr>--- (horizontal rule)
<p>The paragraph text followed by a blank line
&nbsp; &amp; &lt; &gt; &quot;A space, &, <, > and "
Any other tagRemoved; the text inside it is kept

Entities beyond those five, such as numeric codes or &copy;, 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 &amp; Jerry&nbsp;<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, &amp; and &nbsp; 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

TermWhat it means here
HTMLHyperText Markup Language, the tag-based markup browsers render, such as <p>, <h2> and <a>
MarkdownA plain-text formatting syntax that uses characters like #, ** and [ ]( ) instead of tags, readable even before it is rendered
HTML entityA coded stand-in for a reserved or special character, such as &amp; for & or &nbsp; for a non-breaking space
Inline codeA short code fragment wrapped in single backticks in Markdown, the equivalent of an HTML <code> element
Alt textThe alt attribute of an image, which becomes the text inside the brackets of Markdown image syntax
Tag strippingRemoving HTML tags while keeping the text between them, which is what happens to elements this tool does not map

Frequently Asked Questions

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.

Sources and standards