H→M

HTML to Markdown

Convert HTML documents and fragments into clean Markdown with GFM tables

Document & Media
πŸ”’ 100% client-side β€” your data never leaves this page
Maintained by ToolsKit Editorial Teamβ€’Updated: September 5, 2026β€’Reviewed: September 5, 2026
HTML
Markdown
Markdown output will appear here
πŸ”’ HTML is parsed only in this browser and is never uploaded.Supports headings, lists, quotes, code, links, images, and GFM tables.

About this tool

HTML to Markdown converts a complete HTML document or copied fragment into readable Markdown without sending the source to a server. It handles headings, paragraphs, line breaks, emphasis, strikethrough, inline code, fenced code blocks with language classes, blockquotes, horizontal rules, nested ordered and unordered lists, links, images, definition terms, task checkboxes, and GitHub Flavored Markdown tables. Output options let you keep links or retain only their text, preserve images as Markdown or reduce them to alt text, choose a bullet marker, and use backtick or tilde code fences. Script, style, noscript, template, and SVG elements are intentionally skipped. The converter preserves semantic content rather than pixel-perfect web layout, so CSS grids, visual spacing, JavaScript widgets, forms, and dynamically loaded content cannot be represented directly. Use the reverse Markdown to HTML tool when you need HTML output, or HTML to Text when formatting is not required.

Frequently Asked Questions

Which HTML elements are converted to Markdown?

The converter handles headings, paragraphs, line breaks, bold and italic text, strikethrough, code, blockquotes, lists, links, images, horizontal rules, definition items, checkboxes, and GFM tables.

Does it support nested ordered and unordered lists?

Yes. Directly nested UL and OL elements are indented beneath their parent list item, and ordered lists respect a numeric start attribute when one is present.

How are HTML tables converted?

The first table row becomes the Markdown header and remaining rows become the body. Column alignment from header cells is carried into the GFM separator row when available.

What happens to scripts, styles, forms, and dynamic widgets?

Scripts, styles, noscript blocks, templates, and SVG are skipped. Form behavior, CSS layout, and JavaScript-driven content do not have direct Markdown equivalents and are not reproduced.

Can I remove link URLs or image sources from the output?

Yes. Links can become plain anchor text, and images can remain Markdown images, become alt text only, or be removed. Relative URLs are kept as written when preservation is enabled.

Does the converter preserve code block languages?

When a PRE contains a CODE element with a language-* or lang-* class, that language token is placed after the Markdown fence. The fence also grows when needed to avoid closing on code content.

Is the HTML sent to a server?

No. Browser DOMParser performs the conversion on your device, and copying or downloading the Markdown also happens locally.

Keep browsing