MagicTools
documentApril 22, 202640 views4 min read

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

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

Introduction to Prompt Engineering: 10 Practical Tips for Writing High-Quality AI Prompts

Master 10 core techniques of Prompt Engineering, from role setting to chain-of-thought, with comparisons of incorrect and correct examples to help you obtain truly valuable outputs from AI tools.

ai-promptsMay 8, 20267 min
417

Tmux Terminal Multiplexer: Recommended Configuration + Complete User Manual

A complete guide to the tmux terminal multiplexer for developers, including recommended .tmux.conf configuration, common shortcut key cheat sheets, plugin recommendations, and practical tips to help you significantly improve terminal efficiency.

developerApr 22, 20267 min
2290

Practical Guide to Document Format Conversion: Comprehensive Analysis of Markdown, HTML, PDF Interconversion

Comprehensive analysis of conversion methods for four major document formats: Markdown, HTML, PDF, and Word, comparing the pros and cons of various conversion tools, with practical steps and solutions to common problems, helping you choose the most suitable conversion path for different scenarios.

documentApr 22, 20268 min
2298

Complete Guide to JWT Authentication: Principles, Usage, and Security Best Practices

JWT (JSON Web Token) is a mainstream solution for modern API authentication. This article provides an in-depth analysis of JWT's three-part structure, signature verification principles, comparison with Session, as well as key security practices such as storage location selection, expiration and refresh mechanisms, and algorithm confusion vulnerabilities.

developerApr 22, 20268 min
2295

Published by MagicTools