Magic Tools
Document ProcessingBy CooconApril 22, 2026216 views4 min read

HTML to Markdown Converter: Paste, Fetch URL, or Drop Rich Text

What is an HTML to Markdown Converter?

An HTML to Markdown converter transforms HTML markup into clean, readable Markdown syntax that you can use in documentation systems, static site generators, CMS platforms, and code repositories. MagicTools' free online converter supports three flexible input methods — paste raw HTML code, enter a webpage URL for automatic fetching, or paste rich-text content directly — making it the fastest way to migrate web content into Markdown format without manual reformatting.

Key Features

  • Three Input Modes: Paste raw HTML code, provide a URL to fetch page content server-side, or paste rich-formatted text from a word processor or web page.
  • Server-Side URL Fetching: The /api/fetch-url proxy fetches web pages on the server (up to 5 MB, 10-second timeout), bypassing CORS restrictions that block browser-only solutions.
  • Turndown-Powered Conversion: Uses the battle-tested Turndown library to produce clean, idiomatic Markdown that preserves headings, links, lists, code blocks, and tables.
  • Multiple Export Formats: Download the result as a .md file, a styled PDF, a PNG image, or a standalone HTML file.

How to Use the HTML to Markdown Converter — Step by Step

Step 1: Open the Tool

Go to tools.cooconsbit.com/tools/html2md. You'll see an input panel on the left and the Markdown output panel on the right.

Step 2: Choose Your Input Method

Select one of three tabs at the top of the input panel:

Paste Code — Paste raw HTML source directly. Useful when you have exported HTML from a CMS or email editor.

<h1>Hello World</h1>
<p>This is a <strong>bold</strong> paragraph.</p>
<ul>
  <li>Item one</li>
  <li>Item two</li>
</ul>

Fetch URL — Type or paste a webpage URL. The server fetches the page and extracts the main content, then converts it to Markdown.

Paste Rich Text — Copy formatted text from Google Docs, Word, or a webpage and paste it here. The converter reads the clipboard's HTML representation and converts it.

Step 3: Review and Export the Markdown

The right panel shows the converted Markdown immediately. Review it for any edge cases (complex nested tables, custom CSS layouts), make manual edits if needed, then click Export to download as .md, PDF, PNG, or HTML.

Common Use Cases

Migrating a Blog from WordPress or Medium

When moving a blog to a static site generator like Hugo, Gatsby, or Astro, you need to convert hundreds of HTML posts into Markdown. Paste each post's HTML into the converter and get clean Markdown in seconds — preserving headings, images, links, and code blocks.

Archiving Web Articles for Offline Reading

Paste a URL into the Fetch URL tab to pull any public article and convert it to Markdown. The result is a portable, plain-text document you can read offline, store in Obsidian or Notion, or version-control in Git.

Cleaning Up Email Newsletter HTML

Email HTML is notoriously messy, full of inline styles, tracking pixels, and nested table layouts. Paste the raw HTML from an email into the converter to get a clean, readable Markdown version stripped of all presentation noise.

Frequently Asked Questions

What HTML elements are supported in the conversion?

The Turndown library handles all standard HTML block elements (headings h1-h6, paragraphs, blockquotes, lists, pre/code blocks) and inline elements (bold, italic, links, inline code). Complex CSS-based layouts and JavaScript-rendered content may require manual cleanup.

Does the URL fetcher work with JavaScript-rendered pages (SPAs)?

No. The server-side fetcher retrieves static HTML only. If a page relies heavily on client-side JavaScript to render content (e.g., React SPAs), the fetched HTML may be sparse. In that case, use your browser's "View Page Source" or DevTools to copy the rendered HTML and paste it via the "Paste Code" tab.

Is there a file size limit for URL fetching?

Yes. The proxy endpoint has a 5 MB response limit and a 10-second timeout. This covers the vast majority of article and documentation pages. Very large pages (e.g., pages with embedded large data or hundreds of images) may be truncated.

Can I convert Markdown back to HTML?

Not directly in this tool. For Markdown-to-HTML conversion, use the companion Markdown Renderer which renders Markdown to beautifully formatted HTML in real time.

Yes. All <a href> links become [text](url) Markdown links, and <img src> tags become ![alt](url) image references. Relative URLs are kept as-is; you may need to make them absolute for your target platform.

Why Use MagicTools HTML to Markdown Converter?

Unlike browser extensions or local scripts, MagicTools runs entirely online with no installation needed and is completely free. The server-side URL fetcher solves the CORS problem that blocks pure browser-based tools, and Turndown's mature algorithm produces cleaner Markdown than most alternatives. Your content is processed ephemerally — nothing is stored unless you choose to share.

Try it now at tools.cooconsbit.com/tools/html2md

Related Articles

Blocking rm -rf in Claude Code: A Deny Rule Stopped 14 Deletes in Two Weeks, 7 Other Spellings Still Get Through, and a Hook That Closes the Gap

To keep Claude Code from deleting things by accident, I added a deny rule, Bash(rm -rf *), to my global settings. Across my sessions from October 7 to 21 it blocked 14 deletes. After each denial the model picked a new directory name 8 times and dropped the delete 6 times. It never tried another spelling. Then I replayed 22 delete commands verbatim against Claude Code 2.1.285 through a stub. rm -fr, rm -r -f, rm -Rf and rm -r deleted the directory in manual, auto and bypass mode alike. /bin/rm, find -delete and bash -c deleted it in manual and bypass mode. In auto mode, rm -fr inside the working directory skips the classifier because it 'would be allowed in acceptEdits mode'. A second, built-in dangerous-rm check fires on targets like $D/*, even in bypass mode, but loses track of a variable assignment when a heredoc comes earlier in the same command. The post ends with a PreToolUse hook that blocks every recursive spelling in all three modes and tells the model what to do instead.

claude-codehooks+5
pitfallsOct 21, 20268 min
208

The Self-Reinforcing Flywheel Is Harder Than It Looks: 40 Days of an LLM Auto-Tuning Loop

We ran an 'LLM proposes, code decides' auto-tuning loop on a daily WeChat newsletter for 40 days: 18 versions, 8 rollbacks. Three of those rollbacks overturned decisions a human had made, and one version whose knobs were identical to its parent still got rolled back. Using our real numbers, telling apart a 20% difference needs about 25,000 reads per version. At 60 reads a day, that is more than 400 days. This postmortem covers five reasons the flywheel never turned, and what actually moved the numbers.

wechatpostmortem+4
pitfallsOct 21, 20268 min
133

Dev Breakfast · 2026-10-21

Today's headline: A single "bonsoir, Elliot" makes the model leak its .env: a backdoor for under $50. Plus 4 more: DeepSeek open-sources its inference engine: V4.1 Flash only, and KV cache still missing; TorchTPU goes open source: PyTorch models can run directly on TPU; and more.

daily-intelOct 21, 20268 min
446

Dev Breakfast · 2026-10-20

Today's headline: Should You Merge AI Code You Don't Understand: Settle the Abstraction Layer Yourself First. Plus 4 more: tmux as a Remote Control: Multi-Session Claude Code and send-keys; headroom Goes Open Source: 95% Token Savings on JSON, Only 20% for Coding Agents; and more.

daily-intelOct 20, 20265 min
415

Published by Magic Tools