About this tool
Convert HTML into clean Markdown with GFM tables, links, images, and code blocks.
The HTML to Markdown Converter runs Turndown 7 with the turndown-plugin-gfm extension entirely in your browser — nothing is uploaded and no account is needed. Your markup is first parsed by the browser's native DOMParser and cleaned: script, noscript, iframe, object, embed, style and stylesheet-link elements are removed, HTML comments are deleted in a TreeWalker pass, and every on* event-handler attribute is stripped (class, style and id go too, unless you turn that toggle off). Turndown then walks the cleaned DOM and writes Markdown — GFM pipe tables for <table>, and a custom rule that reads the language-* class off a <pre><code> pair so fenced blocks keep their language tag. Conversion re-runs 250 ms after any edit, and the preview tab renders the result with react-markdown and remark-gfm.
Open HTML to Markdown Converter on AltFTool — it loads instantly in your browser.
Paste HTML into the input box, upload an .html file, or click Load Sample to try it with a realistic document.
Adjust the conversion settings — heading style, bullet marker, code fence, GFM tables, front matter, cleanup toggles — and the Markdown regenerates automatically.
Check the result in the Markdown, Preview or Clean HTML tab, then copy it to your clipboard or download it as a .md file.
The turndown-plugin-gfm extension writes <table> markup as GitHub-flavored pipe tables, and a custom rule pulls the language name out of class="language-js" so fenced blocks come out as ```js rather than untagged.
Scripts, noscript, iframes, objects, embeds, stylesheets, HTML comments and every on* event-handler attribute are removed from the parsed DOM first. You can inspect exactly what was kept in the Clean HTML tab.
Choose ATX or Setext headings, inline or reference links, -, * or + bullets, ``` or ~~~ fences, hard line breaks on or off, and whether links and images are kept or flattened to text.
Parsing, conversion, preview and the .md download all run client-side — uploaded files are read with the File API and the download is built from a local Blob. There is no server round-trip, no signup and no usage limit.
Paste your HTML into the input box, or upload an .html, .htm or .txt file. Conversion runs automatically 250 ms after you stop typing, so the Markdown appears without pressing anything — then copy it or click Download .md. There is also a Convert Now button if you want to force a re-run.
Yes. The GitHub tables toggle is on by default and applies turndown-plugin-gfm, which converts <table> into a GFM pipe table with a header separator row. Turn that toggle off and the plugin is not loaded, so table markup collapses to its plain text content — leave it on unless you specifically want that.
No. The DOMParser clean-up pass and the Turndown conversion both run in your browser, uploaded files are read locally with the File API's text() method, and the .md download is generated from an in-memory Blob. Your markup never reaches AltFTool's servers.
Yes. The parser keeps only the <body> content, so the doctype, <head>, meta tags and inline <style> blocks never reach the Markdown at all. Scripts, iframes and embeds are removed on top of that, and event-handler attributes like onclick are always stripped.
Yes, when the source uses the standard highlight convention. The converter matches class="language-xxx" on a <code> element inside <pre> and writes that name after the opening fence, so <code class="language-js"> becomes ```js. If no language class is present, you get a plain fence with the code intact.
Yes — switch on Add front matter and the output is prefixed with a YAML block containing a title taken from the document's first <h1>, a description field, and today's date formatted as YYYY-MM-DD. The preview tab hides the block so you can still read the rendered document.
No limit is enforced and no account is required — the only ceiling is your browser's memory, since everything is processed in the page. Uploads accept .html, .htm and .txt, and the downloaded file is named after the file you uploaded, with a .md extension.
No — this converter is one-directional, HTML in and Markdown out. AltFTool has a separate Markdown to HTML converter for the reverse trip; this page's Preview tab only renders the Markdown for reading, it does not export HTML.
Add the HTML to Markdown Converter widget to your blog or website — free, responsive, no signup. Just keep the “Widget by AltFTool” credit link visible.
<iframe src="https://www.altftool.com/embed/widget/html-to-markdown-converter"
title="HTML to Markdown Converter — free AltFTool widget"
width="100%" height="640" style="border:0;border-radius:12px;overflow:hidden"
loading="lazy" referrerpolicy="no-referrer-when-downgrade" allow="clipboard-write"></iframe>
<p style="font-size:12px;margin:4px 0 0">Widget by <a href="https://www.altftool.com/tools/all/html-to-markdown-converter?utm_source=embed&utm_medium=widget" rel="nofollow">AltFTool — free online tools</a></p>