HTML to Markdown Converter with GFM Tables & Live Preview
Paste HTML and get clean Markdown instantly: GFM tables and strikethrough, ATX or Setext headings, live preview and .md download. Runs in your browser.
Updated November 2026
Reviewed by Rafael Duarte
Live Conversion
Output updates as you type. Runs entirely in your browser.
How to convert HTML to Markdown
Paste HTML and the Markdown appears as you type
1. Paste your HTML
Paste a snippet or a whole page's markup into the Source HTML box. The output updates as you type, with no convert button.
2. Adjust the options
Pick a Heading Style (ATX or Setext), a Bullet Style (*, - or +) and a Code Block Style (Fenced or Indented), and switch GFM Support and Sanitize HTML on or off.
3. Copy or download
Check the result in the MD Code tab or the rendered preview, then click Copy MD or download it as converted.md.
What this HTML to Markdown converter does
Powered by Turndown.js, 100% in the browser
GFM tables, with or without <thead>
With GFM Support on (the default), HTML tables become pipe tables. If there's no <thead>, the first row is used as the header. Bold, code and links inside cells are kept.
Strikethrough
<del>, <s> and <strike> turn into ~~text~~ when GFM Support is on.
Live preview
The Markdown updates a moment after each change, and the preview tab renders it with syntax highlighting for code blocks.
Configurable headings, lists and code
ATX (#) or Setext underline headings; *, - or + as the bullet marker; fenced or 4-space indented code blocks. A language-… class on <code> becomes the fence's language tag.
Basic HTML sanitizing
Sanitize HTML is a simple filter that removes <script> blocks and quoted inline event handlers such as onclick before conversion. It is not a full security sanitizer.
Conversion examples
What HTML tags look like once converted
<h1>Introduction</h1># Introduction<strong>bold text</strong>**bold text**<ul><li>Apples</li></ul>* Apples (marker plus three spaces)<table><tr><td>Name</td></tr><tr><td>Ana</td></tr></table>| Name |, | --- |, | Ana | (first row becomes the header)<p style="color:red"><strong>Warning</strong></p>**Warning** — inline styling is droppedWhen you'll reach for this converter
The most common scenarios people use it for
Migrating a blog to a static site generator
Export HTML from WordPress or a legacy CMS and get clean .md files ready for Hugo, Astro, or Jekyll.
Copying a table out of a web page or wiki
Paste the <table> markup from Confluence, WordPress or any page source and get a GFM pipe table you can drop into a README or an issue.
Cleaning up WYSIWYG editor output
TipTap, Quill, and Froala all generate HTML — convert it before saving if your backend or CMS stores content as Markdown.
Turning HTML emails into documentation
Paste an email body and get clean Markdown for internal docs, changelogs, or a Confluence page.
Prepping clean content for LLM prompts or RAG pipelines
Markdown keeps the headings, lists and links but drops tags and attributes, so the text you pass to a model is shorter and easier to read than raw HTML.
Something not converting right? Start here
Tables not converting with GFM Support off
Without GFM Support, HTML tables aren't turned into pipe tables; only the cell text is kept. Leave the option on if you need tables.
Treating Sanitize HTML as a security filter
It only removes <script> blocks and quoted on… event attributes. Elements like <iframe> or javascript: links are not filtered, so review untrusted HTML yourself.
Expecting CSS styling to carry over
Markdown only supports structural formatting — bold, headings, lists, links. Colors, fonts, and inline styles are intentionally dropped.
Why use this HTML to Markdown converter
You control the shape of the output: heading style, bullet marker and code block style are all options, and tables come out as GFM pipe tables even when the source has no <thead>. The live preview shows how the Markdown will render before you copy it.
The conversion runs on Turndown.js entirely in your browser, so the HTML you paste is never sent to a server. If you need to go the other way, the Markdown to HTML converter uses the same layout.
Frequently asked questions
It's a tool that turns HTML markup (<h1>, <strong>, <ul>) into equivalent Markdown syntax (#, **, *). It's useful for migrating content between platforms, cleaning up output from WYSIWYG editors, and moving web content into Markdown-based docs or note apps.
Paste the <table> markup into Source HTML and keep GFM Support on. The table comes out as a pipe table with a --- separator row. If the table has a <thead>, its cells become the header; if not, the first row does.
GFM is the Markdown variant GitHub uses, adding pipe tables, strikethrough (~~text~~), task lists and autolinks. In this tool, GFM Support converts tables and strikethrough; task-list checkboxes are not converted, and links stay in [text](url) form.
No. The HTML you paste is converted by Turndown inside your browser and never transmitted anywhere.
ATX uses hash symbols (# Heading) and works for all six heading levels. Setext uses underline characters and only supports h1 and h2. ATX is the safer default for maximum compatibility across Markdown renderers.
Yes. Copy the relevant part of the page source (the article body rather than the whole page with menus and footers), paste it in, and you get Markdown with the heading structure intact. It is usually shorter and cleaner input for prompts and embeddings than raw HTML.
Resources
Related Tools
- Convert Markdown to HTML Online (MD to HTML) Developer Paste Markdown and copy the HTML code it generates, with a live preview beside it. Converts GFM tables and task lists and can output a full .html page.
- Online Markdown Editor with Live Preview & HTML Export Developer Write Markdown with a live preview and a formatting toolbar. Open a .md file, download it as .md or HTML, or share it by link. Your draft is autosaved.
- ASCII Table Generator: Plain-Text & Markdown Tables Developer Turn CSV or typed data into a plain-text table: MySQL, Unicode box, rounded, double-line, Markdown, RST or minimal style. Copy it or download as .txt.
- CSV to JSON Converter & JSON to CSV Online Developer Paste or upload a CSV (comma, semicolon, tab or pipe) and get clean JSON. Also converts JSON to CSV that Excel opens without garbled characters.
- HTML Entity Decoder: Unescape HTML to Plain Text Developer Paste text with <, &, " or ' and get plain text back. Decodes every HTML5 named entity plus decimal and hex references, in your browser.