HTML to Markdown

Convert HTML into clean Markdown. Paste any HTML and get GFM-compatible Markdown with table support instantly — no server, no upload.

html markdown converter gfm text
Free Client-Side Private
HTML
0 chars
🔒 This tool runs entirely in your browser — your files are never uploaded to any server.

HTML to Markdown is a free, browser-based converter that transforms HTML markup into clean, readable Markdown. Paste any HTML — a blog post, a documentation page, an email template — and get well-formatted GitHub Flavored Markdown (GFM) output instantly. Nothing is uploaded to a server; all conversion happens locally in your browser.

Tool interface

  • HTML editor — paste or type your HTML into the left panel. The Markdown output updates live on every keystroke. The character count is shown below the editor.
  • Sample button — loads a demo HTML document covering headings, bold, italic, links, blockquotes, code blocks, lists, and a table so you can see the converter in action immediately.
  • Clear button — empties the editor and resets the output.
  • Markdown tab — shows the converted Markdown in a monospace box, ready to copy or save.
  • Preview tab — renders the converted Markdown as formatted HTML so you can verify the output looks correct before using it.
  • Copy button — copies the Markdown to your clipboard with one click.
  • Download button — saves the Markdown as output.md.

Supported elements

HTML element Markdown output
<h1><h6> ATX headings (#######)
<strong>, <b> **bold**
<em>, <i> *italic*
<a href="..."> [text](url)
<code> `inline code`
<pre><code> Fenced code block (`)
<blockquote> > quote
<ul> - unordered list
<ol> 1. ordered list
<table> GFM pipe table
<img> ![alt](src)
<hr> ---
<br> Double-space line break

Common use cases

  • CMS migration — convert HTML pages from an old CMS to Markdown for a static site generator such as Hugo, Jekyll, or Astro
  • Documentation cleanup — transform exported HTML documentation into Markdown files for a docs-as-code workflow
  • Email to Markdown — paste the HTML source of an email newsletter to get a readable plain-text Markdown version
  • Blog post editing — download an article as HTML, convert it to Markdown, edit in any text editor, then convert back
  • Note-taking — pull content from web pages and store it as portable Markdown notes
  • Code review — convert HTML-based specs or tickets to Markdown for inclusion in a README or pull request description

FAQ

What HTML elements are supported?

All standard inline and block elements are converted: headings (h1h6), paragraphs, bold, italic, links, images, inline code, fenced code blocks, blockquotes, ordered and unordered lists, horizontal rules, line breaks, and GFM pipe tables. Unsupported or unknown elements have their tags stripped and their text content preserved.

Are GFM tables supported?

Yes. <table> elements — including <thead>, <tbody>, <th>, and <td> — are converted to GitHub Flavored Markdown pipe tables. Pipe characters inside cell text are automatically escaped with a backslash.

What happens to CSS styles and inline attributes?

Inline styles, class names, and most HTML attributes are dropped during conversion. Only semantically meaningful attributes are kept — href on links, src and alt on images, and class hints on <code> blocks (used as the fenced code language).

Is the content sent to a server?

No. Conversion runs entirely in your browser using the Turndown library. No HTML or Markdown is transmitted anywhere.

Is the preview safe?

Yes. The Preview tab renders Markdown back to HTML using the marked library. Script tags are stripped before the result is inserted into the page, so pasting untrusted HTML cannot execute JavaScript in your browser.

Why does the converted Markdown look slightly different from the original HTML?

Markdown is a simpler format than HTML. Some HTML structures — deeply nested lists, complex tables with merged cells, inline styling — have no direct Markdown equivalent and are simplified or flattened. The semantic meaning is preserved even if the exact visual layout differs.

Can I convert a full HTML page including <head> and <body> tags?

Yes. The converter handles full HTML documents. The <head>, <html>, and <body> wrapper tags are ignored and only the visible content is converted to Markdown.

Report an issue