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-urlproxy 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
.mdfile, 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.
Does the converter preserve links and image URLs?
Yes. All <a href> links become [text](url) Markdown links, and <img src> tags become  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