Free HTML to Markdown Converter
Last updated: November 10, 2026
Quick answer: HTML is the publishing format and Markdown is the authoring format — and moving content between them by hand is slow, error-prone work: a missed closing tag here, a flattened table there, a list that loses its nesting. This free HTML to Markdown converter does the move for you: paste your HTML or upload the file and it returns clean GitHub-flavoured Markdown — headings, bold and italic, links, images, nested lists, blockquotes, fenced code blocks and tables, all converted by a real DOM parser, not by regex tag-stripping. Choose ATX or Setext headings and inline or reference-style links, then copy the result or download it as .md. Everything runs in your browser, so your documents never leave your device.
Conversions: headings become # to ###### (or === / --- for h1/h2 in Setext mode); <strong>/<b> become **bold**, <em>/<i> become *italic*, <s>/<del> become ~~strikethrough~~; links become [text](url) or [text][1] with definitions appended; images become ; <code> becomes `code` and <pre> becomes a fenced block (language detected from class="language-..."); nested lists keep their depth with two-space indents; tables become GitHub-style tables; blockquotes, horizontal rules and line breaks are preserved. Dropped honestly: inline styles, classes, ids, data attributes, and script/style content are not carried over — Markdown has no place for them. Complex nested tables flatten to plain text. Your HTML is parsed locally — nothing is uploaded.
✓ Free forever · ✓ No signup · ✓ Tool inputs stay in your browser — never sent to our servers.
How to Use the HTML to Markdown Converter
- Paste your HTML into the box, or use the file picker to load an .html / .htm file — the contents load into the editor automatically. Full documents work, not just fragments: the converter reads the body and ignores the head, scripts and styles.
- Pick your heading style. ATX (# Heading) is the default and the style GitHub, most static-site generators and most editors expect. Setext (Heading followed by === or ---) matches older Markdown and some documentation styles — it only applies to h1 and h2; deeper headings stay ATX either way.
- Pick your link style. Inline links ([text](url)) are the default and the easiest to read in place. Reference-style links ([text][1] with definitions at the end) keep long URLs out of the prose, which helps when the same URL appears several times or the document will be edited by hand.
- Press Convert to Markdown. The result appears instantly with a line/word count and the number of elements converted. Copy it or Download .md and drop it straight into your repo, CMS, or notes app.
- Check the tables and code blocks before you publish: tables become GitHub-style tables with a header row, and fenced code blocks keep their language when the HTML carries a class like language-python. The note under the output lists every conversion rule, so nothing about the output should surprise you.
Why Use Our HTML to Markdown Converter?
- Real DOM parsing, not regex — the HTML is parsed into a document tree and walked node by node, so nested lists keep their depth, a link inside a list item stays inside the list item, and a code block inside a blockquote stays quoted. Regex tag-strippers flatten all of that.
- GitHub-flavoured tables — <table> becomes a proper Markdown table with a header row, separator line and aligned columns. A table that only has body rows gets a header row built from the first row, so the output renders on GitHub, GitLab and most static-site generators.
- Fenced code blocks with language detection — <pre> becomes a ``` fenced block, and a class like language-python or lang-js on the code element is carried over as the fence language, so syntax highlighting survives the conversion.
- Nested lists that stay nested — ordered and unordered lists keep their depth with two-space indents, and a list inside a list item is indented under that item instead of being flattened to the top level.
- Two heading styles, two link styles — ATX or Setext headings, inline or reference links. The options cover the two decisions that actually differ between Markdown dialects, without a settings panel nobody reads.
- Private by design — parsing happens entirely in your browser. Your documents never leave your device.
Common Use Cases
- Moving a CMS export into a Markdown repo: Your site's pages live in a CMS that exports HTML, but the new docs site is Markdown files in git. Paste each exported page, convert, and the headings, lists, tables and code samples land as clean Markdown you can commit — instead of hand-rewriting a hundred pages or living with a regex export that flattens every table.
- Turning a rendered help article into a README: A help article exists only as a rendered HTML page, and the project needs it as a README.md. Convert it, keep the reference-style links so the long URLs sit at the bottom, and the result reads like a hand-written README — headings, code blocks and all — in one paste.
- Cleaning up AI-generated HTML into notes: A tool hands you formatted HTML and your notes app wants Markdown. Paste the HTML, convert with ATX headings and inline links, and the result drops straight into Obsidian, Notion's Markdown import or a plain-text notes folder without the angle brackets.
- Teaching the HTML/Markdown mapping: Students grasp the format difference fastest by converting the same content both ways: a heading becomes # or ===, a list becomes - items, a table becomes pipes and dashes. The sample button gives a classroom-ready example in one click, and the conversion note under the output spells out every rule.
HTML to Markdown Converter vs Alternatives
- CodeBeautify HTML to Markdown: The #1 incumbent for this exact conversion, and a clean single-purpose converter. It is a solid tool — but a multi-tool site where the converter shares the page with dozens of other utilities, and its conversion rules are not spelled out on the page. This page documents its rules (nested lists, GFM tables, fenced code with language detection, what is dropped) in the note under the output, so you know exactly what the Markdown will look like before you paste.
- htmlmarkdown.com: A focused converter with a simple paste-and-convert flow — good for a quick one-off when you want zero options. This page adds the choices a real document actually needs: ATX vs Setext headings, inline vs reference links, image handling, file upload, and download as .md, plus a line/word count and an element count so you can see at a glance what converted.
- Turndown (JavaScript library): The reference implementation most converters are built on, and the right choice when you need conversion inside your own app: npm install turndown, add rules, run it in Node or the browser. But it needs code and a project; this page runs the same idea — DOM-tree walking, not regex — for the one-off file on your desk in seconds with no setup.
- Pandoc: The power option for batch conversion: pandoc -f html -t markdown converts whole directories, handles footnotes and citations, and targets a dozen Markdown flavours. But it needs installing and a terminal; this page converts the single document you are looking at right now, in the browser, with the heading and link styles chosen on the page.
Online converters will convert your HTML if you paste it, Turndown will convert it inside your code, and Pandoc will convert a whole directory from the terminal. For a one-off conversion with documented rules, nested lists and tables that survive, code blocks that keep their language, and zero upload of your data, this page is the fastest private route from HTML to clean Markdown.