HTML to Markdown

Convert HTML into clean, readable Markdown, turning tags into simple Markdown syntax. No signup. Ideal for developers and writers moving web content into Markdown.

Remove Ads
Remove Ads

Result

Markdown
Remove Ads

Share on Social Media:

An HTML to Markdown converter turns HTML into clean Markdown for docs and readme files — free, with no account. Paste your HTML and get the equivalent Markdown, with headings, links, lists and emphasis converted into simple, readable symbols. It runs entirely in your browser, so nothing is uploaded or stored. Note the exact scope: it covers the common elements well — headings, bold, italic, links, lists, code and quotes — but tables do not convert (their text runs together), nested lists come out flat, and any tag it does not recognise is stripped down to its text (script and style blocks are dropped entirely).

On this page

  1. How to Convert HTML to Markdown Step by Step
  2. Why Convert HTML to Markdown
  3. Markdown Versus HTML for Writing
  4. Who Needs an HTML to Markdown Converter
  5. Pro Tips for Clean Markdown Output
  6. Common HTML to Markdown Mistakes to Avoid
  7. Related Tools You May Need Next
  8. Frequently Asked Questions

How to Convert HTML to Markdown Step by Step

  1. Paste your HTML into the input box. It can be a snippet or a full block of content with headings, paragraphs, links and lists.
  2. Click Convert to Markdown. The tool parses the HTML and converts its elements into the equivalent Markdown syntax, turning tags into Markdown's simple symbols. It does not convert as you type — you must click the button.
  3. Review the Markdown in the Result box. Headings, links, bold, lists and other elements now appear in clean, readable Markdown form instead of HTML tags.
  4. Check for anything the converter could not represent. Tables, nested lists, scripts and styles need attention — see the tables below for exactly what happens to each.
  5. Click Copy and place the Markdown into your readme, documentation, or Markdown file, where it is cleaner and easier to edit than the original HTML. There is no download button — Copy is the only export.

Illustration of HTML code converting to a Markdown document

Why Convert HTML to Markdown

HTML and Markdown are two ways of representing formatted text, serving different purposes. HTML is the markup language of the web, powerful and detailed but verbose, with tags around every element. Markdown is a lightweight alternative that uses simple, readable symbols to convey the same common formatting, designed to be easy to write and read in its raw form. Converting from HTML to Markdown produces a cleaner, simpler version of the same content.

The conversion maps HTML elements onto their Markdown equivalents. Heading tags become Markdown headings with hash symbols, links become Markdown's bracket and parenthesis syntax, bold and emphasis become asterisks, and list items become dashes or numbers. This mapping covers the common formatting that both languages share, and the result conveys the same structure and formatting as the original HTML in a far more concise and readable form.

There is a limit to what conversion can do, because Markdown is deliberately simpler than HTML. Complex HTML with intricate structure or styling cannot be fully represented in Markdown — and this converter does not preserve leftover HTML at all: tags it does not recognise are stripped and only their text is kept. A table collapses into run-together text, a nested list comes out flat, and script and style blocks are dropped entirely, contents included. The main reason to convert is that Markdown is much easier to work with for writing and editing, when content that started as HTML needs to live in a Markdown-based system like a readme file or documentation.

Worked example — this input (the tool's own placeholder):

LineHTML input
1<h1>Hello</h1><p><strong>bold</strong> and <em>italic</em></p>

produces exactly this output:

LineMarkdown output
1# Hello
2(blank line)
3**bold** and *italic*

Markdown Versus HTML for Writing

HTML elementMarkdown produced
<h1> to <h6># to ######
<strong> or <b>**bold**
<em> or <i>*italic*
<code>`code`
<pre>Fenced block ``` with the raw text inside (inner <code> structure lost, line breaks kept)
<a href="url">[text](url)
<img alt src>![alt](src)
<blockquote>> quote
<hr>---
<br>A newline inside the paragraph
<p>Paragraph, separated by a blank line
<ul>- item lines
<ol>1. item — every item numbered 1.

And what does not convert cleanly:

HTMLWhat actually happens
Tables (<table>)Tags dropped, cell text runs together with no separator — NameAgeAnn30. No table, no pipes, no spaces between cells
Nested listsFlattened — children become - child lines at the same level as the parent, with no indentation
<div>, <span>, <section> and other tagsStripped to their inner text only — the texts run together with no separator, and no HTML is ever preserved in the output
<script>, <style>Dropped entirely — their contents never appear in the output
Link without href[text]() — the empty URL is kept, not omitted
Image without alt![](src) — the empty alt text is kept, not omitted

Markdown is simpler than HTML. Markdown supports common formatting but not the full range of HTML, so a converter handles common elements cleanly and reduces the rest to plain text. That trade is the point: you give up HTML's precision and get back text that is far easier to read, write and edit.

Who Needs an HTML to Markdown Converter

Developers writing documentation. A developer converts HTML content into Markdown for their project's documentation or readme, getting clean, editable Markdown from web markup.

People migrating web content. Someone moving content from a web page or HTML source into a Markdown-based system converts it, preserving the formatting in Markdown form.

Writers preferring Markdown. A writer who works in Markdown converts HTML they have received into their preferred format, which is easier to read and edit than raw HTML.

Bloggers and content creators. Someone whose content is in HTML but whose platform or workflow uses Markdown converts it to fit their Markdown-based process.

Note takers. A person saving web content into Markdown notes converts the HTML into clean Markdown, which is more pleasant to store and edit than tags.

Laptop showing HTML code converting to a Markdown document

Pro Tips for Clean Markdown Output

Use it for moving web content to Markdown. When content is in HTML but needs to live in a Markdown system like a readme or docs, converting gives you clean, editable Markdown rather than verbose HTML tags — which is the ideal workflow.

Script and style blocks are dropped. Their contents never appear in the output — a script or style block simply vanishes, so there is nothing to clean up afterwards.

Rebuild tables by hand. Table cell text runs together with no spaces, so a converted table is unreadable. Copy the data out and generate a proper Markdown table with the CSV to Markdown Table tool instead.

Flatten nested lists first. Nested items come out at the same level as their parents, so restructure nested content into separate lists or headings before converting.

Expect every ordered-list item to be numbered 1. The converter writes 1. for every item. Most Markdown renderers renumber automatically, but renumber by hand if yours does not.

Preview the rendered Markdown. After converting, preview how the Markdown renders to confirm it looks right, since the raw Markdown syntax appears different from the formatted output it produces.

Convert the other way when needed. If you need to go from Markdown to HTML instead, our Markdown to HTML tool handles that direction, rendering Markdown into the HTML a web page needs.

Common HTML to Markdown Mistakes to Avoid

Expecting perfect conversion of complex HTML. Markdown is simpler than HTML and cannot represent everything, so complex HTML with intricate structure or styling may not convert perfectly. The converter handles common elements well and reduces the rest to plain text.

Expecting tables to convert. They do not. A table collapses into run-together text — NameAgeAnn30 — with no table, no pipes and no spaces between cells. Rebuild tables separately.

Expecting nested lists to stay nested. Indented items are flattened to the same level as their parent. Keep lists to one level here, or restructure nested content first.

Expecting script or style contents to appear. They do not — script and style blocks are dropped entirely, contents included. If you need that code or CSS, copy it out before converting.

Expecting leftover HTML to be preserved. No HTML is ever kept in the output. Unhandled tags are stripped and only their text remains — so do not paste HTML expecting parts of it to survive as tags.

Expecting ordered lists to be numbered 2., 3. Every item comes out as 1.. Renumber after pasting if your renderer needs sequential numbers.

Not previewing the rendered result. The raw Markdown syntax looks different from its formatted output, so not previewing can hide whether it looks as intended. Preview it to confirm the headings, links and lists render correctly before using it.

Converting when you actually need HTML. If your destination requires HTML, converting to Markdown is the wrong direction. Markdown suits Markdown-based systems, so only convert when your target actually uses Markdown, not when it needs HTML markup.

Converting with an empty input box. With nothing pasted, clicking Convert to Markdown shows an "Invalid Input" notice and leaves any previous result unchanged. Paste your HTML first.

Related Tools You May Need Next

Markdown to HTML. Convert Markdown back into HTML.

CSV to Markdown Table. Generate a Markdown table from spreadsheet data.

Markdown Editor. Write and preview Markdown.

HTML Viewer. See converted HTML rendered in a browser.

Strip HTML Tags. Remove tags from HTML to get clean plain text.

3D illustration of HTML converting to a Markdown document

Frequently Asked Questions

How do I convert HTML to Markdown?

Paste your HTML into the input box and click Convert to Markdown. The tool parses it, converting its elements into equivalent Markdown syntax: heading tags become hash symbols, links become bracket and parenthesis syntax, bold and emphasis become asterisks, and lists become dashes or numbers. Copy the resulting Markdown into your readme, documentation or Markdown file. It runs entirely in your browser, so your HTML is never uploaded.

Which HTML elements convert to Markdown?

Headings H1–H6, bold with <strong> or <b>, italic with <em> or <i>, inline code, preformatted blocks (as fenced code blocks), links, images, blockquotes, horizontal rules, line breaks, paragraphs, unordered lists and ordered lists. Inline formatting also works inside headings. The full table above lists every supported element — and everything that does not convert cleanly.

What happens to tables?

They do not convert. The table tags are dropped and the cell text runs together with no separator at all — a Name/Age table with Ann/30 becomes the single string "NameAgeAnn30". There is no <table>, no pipes and no spaces between cells. Copy the data out and build a proper Markdown table separately, for example with the CSV to Markdown Table tool.

What happens to nested lists?

They flatten. A nested list inside a list item produces plain "- child" lines at the same level as the parent, with no indentation, so parent and child become siblings in one flat list. Keep lists to one level here, or restructure nested content into separate lists or headings before converting.

What happens to divs, spans and other tags?

They are stripped to their inner text. Any tag the converter does not recognise — div, span, section, table and the rest — is dropped and only the text inside it is kept. No HTML is ever preserved in the output, so do not paste HTML expecting parts of it to survive as tags.

What happens to script and style blocks?

They are dropped entirely. Unlike other unrecognised tags, whose inner text is kept, script and style blocks vanish with their contents — neither alert(1) from a script nor CSS rules from a style block appear in the Markdown. If you need that code, copy it out before converting.

Why are all my ordered-list items numbered 1.?

Because the converter writes the literal marker "1." for every ordered-list item, never 2., 3. and so on. Most Markdown renderers renumber automatically when they display the list, but if yours does not, renumber the items after pasting.

What happens to a link without an href, or an image without alt text?

The empty attribute is kept, not omitted: a link with no href becomes [text](), and an image with no alt text becomes ![](src). Fill in the href or alt text in the HTML first if you want a complete Markdown link or image.

Does the converter keep any HTML in the output?

No. Nothing is preserved as HTML: recognised elements become Markdown, and everything else is stripped down to plain text. If you need an HTML element that Markdown cannot express, add it to the Markdown yourself after converting — Markdown does allow embedded HTML.

Is the HTML to Markdown converter free, and is my HTML uploaded anywhere?

Yes, it is completely free with no account and no usage limit. It runs entirely in your browser, so your HTML is processed locally and never uploaded or stored, and the clean Markdown is ready to copy the moment you click Convert to Markdown.