HTML to Markdown Converter
Moving a WordPress article into Hugo, archiving a Confluence page as notes, or cleaning up a rich-text email for a docs wiki all mean converting HTML into Markdown. This converter maps headings, paragraphs, lists, links, images and code blocks to their Markdown equivalents, so the content keeps its structure without the HTML baggage.
How to convert HTML to Markdown
-
1
Paste HTML
Full pages, rich-text email bodies, or snippets: all are parsed.
-
2
Convert
Headings, paragraphs, lists, links, images and code blocks are mapped to Markdown.
-
3
Copy the Markdown
Drop the output into Obsidian, Hugo, Jekyll, Notion or a Git repo.
Mapping HTML into Markdown
The converter walks the DOM and emits Markdown for each recognised element. Wrapper tags such as <div>, <span>, <section> and <article> are dropped and their content is kept at the correct nesting level.
Element mapping
| HTML | Markdown output |
|---|---|
<h1> through <h6> |
# to ###### headings |
<strong>, <b> |
**text** |
<em>, <i> |
*text* |
<code> inline |
`text` |
<pre><code> |
triple-backtick fenced block, with language if set |
<a href> |
[text](url) |
<img src alt> |
 |
<ul><li> |
- item |
<ol><li> |
1. item |
<blockquote> |
> quote |
<hr> |
--- |
What happens to the rest
Markdown cannot express every HTML element. Tags without a Markdown equivalent are dropped and only their text content is kept:
<table>: the text inside the cells survives, but the table grid is lost. Use a table-aware converter when the structure matters.<del>,<u>and other inline styling: the text survives, the styling does not.<video>,<audio>,<iframe>: these embeds produce nothing renderable in Markdown.<details>/<summary>: the text inside is kept, the disclosure widget is not.
For lossless round-trips, convert from the original Markdown source rather than from rendered HTML.
Frequently Asked Questions
Plain <div> and <span> wrappers are dropped and their content emitted at the correct nesting level. Layout-only divs become invisible in Markdown, which is usually what you want for docs.
Yes. <pre><code class="language-js"> becomes a fenced block with js as the language hint. Indented code blocks without a language fall back to plain fenced blocks.
The text inside <table> cells is kept, but the grid itself is not: rows and columns are not preserved, so the layout is lost. Use a table-aware converter when the structure matters.
Almost, but subtle formatting (reference-style links, hard line breaks with two trailing spaces, alternative emphasis markers) may normalise. For lossless round-tripping, keep the original Markdown.
Related Tools
ASCII Table Reference
Full ASCII table from 0 to 127 with decimal, hex, octal, binary, standard names and HTML numeric-reference notation, including NUL, LF and DEL.
Color Palette Generator
Generate monochromatic, analogous, complementary, triadic or tetradic color palettes from a base HEX color and export copy-ready CSS variables.
HTML Character Reference
Searchable list of HTML entities, their named and numeric codes, and a one-click copy for special characters and symbols.
FPS Counter
Measure browser FPS with requestAnimationFrame, smoothing, min/max frame rate, warnings and an optional graph. Runs locally with no upload or API.
HEX Color Picker
Pick or enter a HEX colour and get RGB, HSL, approximate CMYK, relative luminance and contrast ratios against white and black.
JSON Formatter
Paste JSON to pretty-print with 2 or 4 spaces, minify it to compact output, or run a quick syntax check before copying the result.
Tool available in other languages
- Konverterare från HTML till Markdown [SV]
- محوّل HTML إلى Markdown [AR]
- Convertisseur HTML en Markdown [FR]
- Konverter HTML ke Markdown [ID]
- HTML-zu-Markdown-Konverter [DE]
- HTML → Markdown 변환기 [KO]
- HTML naar Markdown converter [NL]
- HTMLからMarkdownへの変換ツール [JA]
- เครื่องแปลง HTML เป็น Markdown [TH]
- Konwerter HTML na Markdown [PL]
- Convertidor de HTML a Markdown [ES]
- Chuyển đổi HTML sang Markdown [VI]
- Conversor de HTML para Markdown [PT]
- Convertitore da HTML a Markdown [IT]
- Конвертер HTML в Markdown [RU]
- HTML'den Markdown'e Çevirici [TR]
- HTML到Markdown转换器 [ZH]