HTML to Markdown Converter
Paste HTML and get Markdown that keeps the structure: headings, bold and italics, links, images, lists, quotes, code blocks and simple tables. Scripts, styles and layout wrappers are dropped, and the page shows how much shorter the result is. Free, no sign-up, and the HTML is parsed in your browser, never uploaded.
How to Use the HTML to Markdown Converter
- 1. Paste your HTML. A fragment or a full page both work; only the body is converted.
- 2. Press Convert to Markdown. The Markdown appears below with three counters: HTML characters, Markdown characters and the size reduction.
- 3. Check the result. Read it against your original, especially tables and nested lists (see the limits below).
- 4. Copy it. Copy Markdown puts the text on your clipboard, ready for a README, a static-site generator or a note-taking app.
What Each HTML Element Becomes
The tool parses your HTML with the browser's own HTML parser and walks the tree, so malformed markup is repaired the way a browser would repair it. Each element then maps to its Markdown counterpart:
| HTML | Markdown |
|---|---|
h1 to h6 | # to ###### followed by the heading text |
p | A paragraph separated by blank lines |
br, hr | A line break; --- |
strong, b | **bold** |
em, i | *italic* |
code | The text wrapped in single backticks |
pre | A fenced block of three backticks, with no language label |
a | [text](address) |
img |  |
ul, ol | - bullets, or 1. 2. 3. renumbered from 1; sub-lists indented two spaces per level |
blockquote | Each line prefixed with > |
table | A pipe table; the first row becomes the header |
div, span, section, anything else | Unwrapped: the tag goes, its contents stay |
script, style, head, meta, link, title, noscript, template, iframe | Removed with their contents |
Worked Example
HTML
<h1>Citation Basics</h1><p>Use <strong>APA</strong> or <em>MLA</em>; see the <a href="https://apastyle.apa.org">APA site</a>.</p><ul><li>Author</li><li>Year<ul><li>Month</li></ul></li></ul><table><tr><th>Style</th><th>Year</th></tr><tr><td>APA</td><td>7th</td></tr></table>
Markdown
A # Citation Basics heading; a paragraph reading Use **APA** or *MLA*; see the [APA site](https://apastyle.apa.org).; the list - Author, - Year and an indented - Month; then a two-column pipe table with --- separators and one row, APA and 7th.
Counters
273 HTML characters, 159 Markdown characters, a 42% reduction.
Markdown cannot express everything HTML can, which is the point of it: the output is the document's structure and none of its presentation.
Limits to Check
- Tables are flattened. Each cell is reduced to its plain text, so links and emphasis inside cells are lost, pipes are escaped, and merged cells are not understood. Pipe tables are a GitHub Flavored Markdown extension, not part of core CommonMark, so check your destination supports them.
- Some inline tags are dropped. Underline, strikethrough, superscript and subscript have no Markdown equivalent here, so their text is kept without formatting.
- Special characters are not escaped. A literal asterisk or underscore in your text is left as it is and may be read as emphasis by a Markdown renderer.
- Nested numbered lists are indented two spaces per level, which most renderers accept but some want three under a
1.marker. - Links and images keep their original addresses, so relative paths stay relative.
Which Tool Do You Need?
Use this page to keep the structure when moving from HTML to Markdown. If you want only the words, HTML Tag Remover outputs plain text. Going the other way, Markdown to HTML renders Markdown, and Markdown to Text strips Markdown down to plain text. To tidy HTML before converting, use the HTML Formatter.
Frequently Asked Questions
- Which HTML elements are converted to Markdown?
- Headings, paragraphs, line breaks, horizontal rules, bold, italics, inline code, code blocks, links, images, ordered and unordered lists, blockquotes and simple tables. The table above lists the exact mapping.
- Does it handle nested lists?
- Yes. Sub-lists are indented two spaces per level, and ordered lists are renumbered from 1. A list that begins at another number in the HTML, such as
start="5", is renumbered from 1 too. - What happens to tags the converter does not recognize?
- They are unwrapped: the tag is dropped and its text kept. A div or span disappears without trace, while script, style and similar elements are removed together with their contents.
- Can it convert HTML tables?
- Simple ones, yes: they become pipe tables with the first row as the header. Merged cells, nested tables, and links or formatting inside cells are not preserved.
- Does it work on a whole web page?
- Yes, but it converts everything in the body, including navigation menus and footers, as ordinary text and links. For an article, paste just the article's HTML.
- Why does the Markdown look plainer than the original page?
- Markdown records structure — headings, emphasis, links, lists — not colours, fonts or layout. CSS, forms and embedded widgets are dropped by design.
- Is my HTML uploaded to a server?
- No. The conversion runs in your browser using its built-in DOMParser, which does not run scripts in the pasted HTML, and nothing you paste leaves your device.