</>MDTooltools

Free Online HTML to Markdown Converter: GFM Output

Paste HTML or upload a .html file and get clean GitHub Flavored Markdown, with tables, fenced code blocks with language tags, nested lists, links, and images.

Updated July 3, 2026

HTML to Markdown conversion strips HTML down to its semantic structure, such as headings, links, tables, lists, and code, and re-expresses it as plain Markdown text. MDTool converts HTML to Markdown entirely in your browser: paste HTML directly or upload a .html file, and get clean GitHub Flavored Markdown (GFM) back, powered by the turndown library. Free, no signup, no file size limit.

Diagram: converting a HTML file into MarkdownHTMLfileMarkdownoutput

How to Convert HTML to Markdown

There are two ways to get your HTML into the converter: paste it directly, or upload a file:

  1. Paste: Copy your HTML and paste it directly into the left panel
  2. Or upload: Click Upload .html, or drag and drop a .html or .htm file, to load it from disk instead
  3. The Markdown output updates live on the right as soon as you paste or the file loads
  4. Click Copy to copy the Markdown to your clipboard, or Download .md to save it as a file

What Should You Know Before Converting HTML to Markdown?

Why Convert HTML Back to Markdown?

The most common trigger is content migration: pulling pages out of a CMS or documentation platform that only exports HTML, such as Confluence, WordPress, or a Word-generated export, into a Markdown-based destination like a README, a static site, or an Obsidian vault. The second most common case is HTML copied directly from a rendered webpage (View Source or Inspect Element) that needs to become readable, portable text instead of markup.

A third case is developer workflows: cleaning up HTML snippets for a GitHub README, a docs site built on Markdown, or a changelog, where the source content started as HTML but the destination format is Markdown. In all three cases, the underlying need is the same: keep the structure (headings, links, tables, code), drop everything that's presentation rather than content.

What Does MDTool Preserve When Converting?

MDTool's converter is built on turndown with the GFM plugin, following CommonMark + GitHub Flavored Markdown conventions. Semantic tags map directly to their Markdown equivalents:

HTML elementMarkdown output
<strong>, <em>✅ **bold**, *italic*
<table>✅ GFM pipe table
<pre><code class="language-js">✅ Fenced code block, language preserved
<a>, <img>✅ Markdown links and image syntax
<h1> to <h6>, <ul>/<ol> (incl. nested)✅ # headings, indented Markdown lists

What Gets Stripped From the HTML?

HTML can express things Markdown simply has no syntax for: presentation applied through CSS classes rather than semantic tags, inline style attributes, <span> wrappers used purely for color, and executable markup like event-handler attributes. Markdown supports roughly 15 formatting constructs against HTML's 100+ element types, so this is a deliberate, lossy design choice, not a bug.

HTML elementMarkdown output
Inline style, color-only <span>❌ Dropped (no Markdown equivalent)
<script>, <style>❌ Dropped (non-content markup)
onclick and other event-handler attributes❌ Dropped (behavior, not content)
colspan/rowspan, nested tables❌ Flattened (GFM tables can't represent merged cells)

The result favors a clean, portable Markdown file over pixel-perfect fidelity to the original page, which is usually what you want when the destination is a README, a wiki, or another Markdown-based tool rather than a visual reproduction of the source HTML.

Is MDTool's HTML to Markdown Converter Free?

Yes, and it stays free for a structural reason, not a promotional one: conversion runs entirely as JavaScript in your browser. There's no server processing each submitted file, no backend infrastructure to pay for per conversion, and no API usage to meter, so there's nothing to recoup with a paywall, a usage cap, or a signup wall. Some competing tools that process HTML on a server do incur that cost, which is part of why they sometimes gate features (file size, conversion count, batch processing) behind an account. MDTool's no-signup, no-limit model is a direct consequence of where the conversion actually happens, not a temporary offer.

Frequently Asked Questions

Yes. MDTool uses turndown with the GitHub Flavored Markdown plugin, so the output follows GFM conventions: pipe tables, fenced code blocks, task lists, and strikethrough all use the syntax GitHub, GitLab, and most static site generators expect.