HTML to Markdown. Live, with GFM tables.
Paste HTML. Markdown renders live on the right. The reverse-direction companion to our Markdown → HTML. Powered by Turndown (MIT) loaded once from jsDelivr CDN, every conversion happens in your browser.
// Markdown output appears here
Sources used
- Turndown, MIT-licensed HTML-to-Markdown converter, loaded from jsDelivr CDN once at page load
- turndown-plugin-gfm, GitHub Flavored Markdown extension (tables, task lists, strikethrough)
- CommonMark spec, the strict Markdown specification Turndown targets
HTML is parsed in your browser. After the initial library fetch, no network requests carry your content.
Privacy: parsing happens in your browser. Nothing is sent or logged.
How to use the HTML to Markdown converter
This converter turns HTML into Markdown as you type or paste. It uses Turndown, an open source library, to read the HTML in your browser and write out headings, lists, links, code and quotes in Markdown, plus tables, strikethrough and task lists when the GitHub Flavored option is on. It is for moving blog posts into a Markdown based site, cleaning up exported docs, or making web content shorter to paste into an AI chat.
Step by step
-
Paste your HTML
Paste HTML into the HTML input box. The page opens with a sample that uses every common element, so you can see the output before you paste anything. Press clear to empty the box, or load sample to bring the sample back.
-
Choose GitHub Flavored or plain Markdown
Leave GitHub Flavored extension ticked to convert tables into pipe tables, struck out text into tilde strikethrough and checkboxes into task list items. Untick it if the place you will paste into only supports basic Markdown; those elements are then not turned into their Markdown forms.
-
Pick the list and code style
Next to Bullet:, choose the hyphen or the asterisk for bullet points. The hyphen is selected at the start. Next to Code blocks:, choose fenced ``` for code wrapped in triple backticks, which keeps the language name, or indented (4-sp) for code indented by four spaces.
-
Check the Markdown output
The Markdown output panel beside the input (below it on a phone) updates on every change. Headings use # marks, bold uses double asterisks and italics use single asterisks.
-
Copy or download
Press copy to put the Markdown on your clipboard, or download .md to save it as a file named export.md.
Reading the result
- The status bar under the panels sums up each conversion: the character count before and after, and how many headings, links and fenced code blocks the Markdown contains.
- The code block count only counts fenced blocks. With indented (4-sp) chosen it reads 0 even when the output has code.
- The counters above each panel show the size of the input and of the output in characters. Markdown is usually much shorter than the HTML it came from, because tags and attributes are dropped.
- If the status bar shows a red cross, Turndown could not read the input. Check that you pasted complete HTML.
Tips and common mistakes
- Paste HTML source, not text copied from a web page. Copying from a page and pasting into the box gives plain text with no tags. Use View page source, or right click an element, choose Inspect, and copy its outer HTML.
- Styles, class names and layout wrappers have no Markdown form, so only the text inside them survives. Use real headings, lists and emphasis in the HTML if you want them kept.
- Tables with merged cells lose the merge. Check any complex table by eye after converting.
- If the output stays empty and the status bar says Loading Turndown when you type, an ad blocker or a lost connection has stopped the library from loading. Allow cdn.jsdelivr.net or reload the page.
Privacy and limits
When the page opens, your browser downloads the Turndown library and its GitHub Flavored plugin from the jsDelivr CDN at cdn.jsdelivr.net. After that, every conversion runs in your browser and your HTML is not sent anywhere or saved. Closing the tab clears it.
Markdown can't represent every HTML construct.
Inline styles and class names are stripped. Markdown has no equivalent. If your HTML uses inline <span style="color: red"> for emphasis, the styling won't survive the trip, the text remains but the color is lost. Use semantic HTML (<strong>, <em>, <mark>) for any styling you want preserved.
Custom HTML tags pass through unchanged. Web components, custom React components serialized to HTML, and any unknown tags get included as raw HTML in the Markdown output. Most Markdown renderers accept inline HTML, but it's a code smell, strip the wrapper or convert manually for cleaner Markdown.
Form elements are stripped or degraded. <input>, <select>, <textarea> have no Markdown equivalent (except for task-list checkboxes via GFM). The only form construct that converts cleanly is the GFM task list checkbox.
Video and audio degrade to a link. <video> and <audio> tags become a plain link to the source URL. The embedded player itself can't be represented in Markdown, that's a renderer-side concern (most static-site generators have their own embed shortcodes).
Tables degrade without GFM. Without the GFM extension toggle on, HTML tables get rendered as raw HTML in the Markdown output (still valid Markdown, just not the pretty pipe-and-dash form). With GFM on, simple tables convert cleanly; complex tables with rowspan / colspan / merged cells lose the merge information and may need manual fix-up.
Four jobs this tool covers.
Job 1: CMS migration. Migrating from a Wordpress / Drupal / custom CMS to a Markdown-based static-site generator (Eleventy, Hugo, Astro, Next.js MDX). Convert each post here, save as .md, drop into the new content directory. Faster than a full pandoc pipeline for one-off migrations.
Job 2: Email-to-blog conversion. Pasted HTML from an email newsletter that you want to publish as a blog post. Strip the email-specific styling by converting to Markdown, then re-render through your blog's Markdown renderer with your standard stylesheet. The result reads as native blog content, not a forwarded email.
Job 3: Notion / docs export. Notion exports as HTML by default. Convert here to get clean Markdown ready to paste into a README, a wiki, or a code-comments doc. Pair with our Markdown → HTML for the reverse direction during round-trip workflows.
Job 4: AI prompt prep. When feeding HTML content to ChatGPT or Claude, Markdown is the more token-efficient format, typically 30-50% smaller for the same semantic content. Convert here, paste into the AI prompt. The model parses it just as cleanly and you save tokens. Pair with our Character Counter to verify the savings.
Six questions users ask.
Which HTML elements get converted?
Standard CommonMark coverage: h1-h6 → # ## ### etc, p → paragraph, ul/ol/li → bulleted/numbered lists, strong/b → **bold**, em/i → *italic*, code → backtick, pre/code → fenced code block, blockquote → > prefix, hr → ---, a → [text](url), img → . With GFM enabled: table → pipe-and-dash table, del/s → ~~strikethrough~~, input checkbox → - [ ] / - [x] task list. Anything not on this list (custom HTML, divs, spans without semantic content) gets passed through as-is or stripped.
What gets stripped or lost?
Markdown can't represent every HTML construct, so anything beyond the supported set is lossy. Specifically lost: inline styles, class names, data attributes, custom tags (web components), most form elements (input, select, textarea), semantic-only divs and spans, video / audio elements (degraded to a link). For HTML that uses these heavily, the conversion is approximate, review the output and fill gaps manually. For semantic, well-structured HTML (most blog post content, README files), the conversion is essentially lossless.
What's the GFM extension toggle for?
GitHub Flavored Markdown adds three constructs to CommonMark: tables (pipe-and-dash syntax), strikethrough (~~text~~), and task list checkboxes (- [ ] / - [x]). With GFM enabled, those HTML elements (table, del, input checkbox) convert to their Markdown forms. With GFM off, tables get rendered as raw HTML pass-through (they don't convert to anything). Most modern Markdown contexts (GitHub, Notion, Slack, modern static-site generators) support GFM, so leave it on by default.
Can I customize bullet and code-block style?
Yes. Bullet marker: hyphen (-) is the most common modern default; asterisk (*) was the older convention; both are valid CommonMark. Code blocks: fenced (triple backticks) is the modern default and supports language hints; indented (four spaces) is the original CommonMark style and doesn't carry language info. Most modern Markdown is hyphen + fenced; pick the alternative if your downstream consumer expects them.
Why does pasting from rich text not work?
Rich-text paste from Word, Google Docs, or web pages includes a lot of inline styles and Microsoft-specific markup (<o:p>, mso-style classes, etc.) that Turndown can't parse meaningfully. The cleanest workflow: paste the rich text into a browser-based rich-text editor first (Notion, a Gmail compose window) to strip the platform-specific cruft, then copy from there as HTML and paste here. Or paste as plain text and re-format. For batch conversions from Word, use pandoc or a real document conversion pipeline.
Is the HTML I paste sent anywhere?
No. Conversion happens entirely in your browser using Turndown, loaded once at page-load from jsDelivr CDN. After that initial library fetch, no further network requests are made. Your HTML content is never sent to Digital Heroes servers. Safe for unpublished documentation, NDA'd content, or internal release notes.
Published · Last updated .