HTML to Markdown Converter — Free, Live Preview & URL Fetch
Stop copying HTML into separate scripts or installing libraries just to clean up content. Paste any HTML — or drop in a URL — and get clean, readable Markdown in real time, directly in your browser. No server, no signup, no waiting.
This HTML to Markdown converter runs entirely client-side using the Turndown library. It handles headings, paragraphs, bold, italic, links, images, lists, blockquotes, code blocks, and tables (with GFM mode). You control the output format: choose ATX or Setext headings, pick a bullet marker (*, -, or +), and toggle GitHub Flavored Markdown support.
How to Use the HTML to Markdown Converter
Converting HTML to Markdown takes three steps:
- Paste your HTML — drop any HTML snippet or full page source into the left panel. The Markdown output appears in the right panel immediately, updating live as you type.
- Adjust options — in the center panel, choose heading style (ATX or Setext), bullet marker, and toggle GFM support or Sanitize HTML to fit your target platform.
- Copy or download the result — click "Copy MD" to copy the Markdown to your clipboard, or "Download" to save a
.mdfile ready for your editor. - Fetch a URL directly — paste any public URL in the bar at the top and click "Fetch & Convert". The tool fetches the page, strips navigation and ads, extracts the main content, and converts it to Markdown automatically.
HTML to Markdown Examples
Here are concrete examples showing what the converter produces for common HTML patterns:
Example — Headings and paragraphs:
Input: <h1>Getting Started</h1><p>Install the <strong>package</strong> first.</p>
Output: # Getting Started\n\nInstall the **package** first.
Example — Unordered list:
Input: <ul><li>Apples</li><li>Oranges</li><li>Bananas</li></ul>
Output: * Apples\n* Oranges\n* Bananas
Example — Link with image:
Input: <a href="https://example.com"><img src="logo.png" alt="Logo"></a>
Output: [](https://example.com)
Example — GFM table (GFM mode enabled):
Input: <table><thead><tr><th>Name</th><th>Role</th></tr></thead>
<tbody><tr><td>Alice</td><td>Dev</td></tr></tbody></table>
Output: | Name | Role |\n| --- | --- |\n| Alice | Dev |
Example — Inline styles (edge case):
Input: <p style="color:red; font-size:16px"><strong>Warning</strong></p>
Output: **Warning**
Inline CSS styles are stripped — Markdown doesn't support arbitrary styling. Structural formatting is preserved; visual decorations (colors, fonts) are not.
HTML to Markdown — What It Is and Why It Matters
HTML to Markdown conversion is the process of translating semantic HTML markup into the equivalent plain-text Markdown syntax. <h1>Title</h1> becomes # Title; <strong>bold</strong> becomes **bold**; <ul><li>item</li></ul> becomes * item.
This is useful because Markdown is much easier to read, write, and maintain than HTML — especially for content that will live in version control, documentation systems, or knowledge bases like Obsidian, Notion, or Confluence. It's also the format expected by static site generators (Hugo, Astro, Jekyll, Eleventy) and many CMS platforms.
This converter uses Turndown.js under the hood, a battle-tested browser library that handles all standard HTML elements correctly. Turndown runs entirely in your browser — no HTML is uploaded to any server.
Common Use Cases
- Migrating a blog from WordPress/CMS to a static site: Export post HTML, paste it here, get
.mdfiles ready for Hugo, Astro, or Jekyll. URL Fetch makes batch migration faster — paste each post URL and convert in seconds. - Saving web articles to Obsidian: Use URL Fetch to convert any article to Markdown, then paste into your Obsidian vault with all headings and links preserved.
- Cleaning up WYSIWYG editor output: Rich text editors (TipTap, Quill, Froala) output HTML. If your backend stores Markdown, convert the HTML output here before saving.
- Converting HTML emails to documentation: Email clients produce nested HTML. Paste the email body and get clean Markdown for your internal docs or Confluence pages.
- Learning Markdown syntax: Write something in HTML, see the Markdown equivalent instantly. It's a hands-on reference for Markdown formatting.
Common Mistakes with HTML to Markdown
- Pasting already-converted Markdown: If your input is already Markdown, running it through the converter will treat Markdown syntax characters as text and double-escape them. Always paste raw HTML, not Markdown.
- Expecting inline styles to survive:
<span style="color:red">has no Markdown equivalent. Color, font size, and margin properties are always stripped. If you need styled text in Markdown, consider HTML passthrough (some Markdown parsers render raw HTML embedded in.mdfiles). - Converting complex nested tables: Tables with merged cells (
colspan,rowspan) will lose the merge structure in Markdown. Markdown pipe tables only support simple row/column grids. Review converted tables manually.
Frequently Asked Questions
What HTML elements does this converter support?
All standard semantic HTML: headings (h1–h6), paragraphs, bold, italic, strikethrough (GFM), links, images, ordered and unordered lists, blockquotes, inline and block code, horizontal rules, and tables (GFM mode). Non-semantic elements like <div>, <span>, and <section> are treated as block containers — their content is preserved, but the elements themselves are stripped.
Does the URL fetch feature work with any website?
It works with most public, article-style pages. The tool fetches the page via a CORS proxy, strips navigation, headers, footers, and ads, and extracts the main content area. Pages behind login walls, paywalls, or anti-scraping protections cannot be fetched. Works best with clean editorial content (blog posts, documentation pages, Wikipedia articles).
What is the difference between ATX and Setext heading styles?
ATX uses hash symbols: # Heading 1, ## Heading 2. It works for all six heading levels and is supported everywhere. Setext uses underlines: Heading 1\n=========. It only applies to h1 and h2 and is not supported by all Markdown parsers. Most modern tools prefer ATX — use Setext only if your target platform specifically requires it.
What is GitHub Flavored Markdown (GFM)?
GFM is a Markdown extension used by GitHub, GitLab, and many other platforms. It adds: pipe tables (converted from <table>), strikethrough (~~text~~ from <del>), task lists, and autolinks. Enable GFM in the options panel to activate these extensions. Leave it off for strict CommonMark compatibility.
Is my HTML sent to any server?
No. The Turndown library runs entirely in your browser. Nothing is uploaded. The URL Fetch feature makes a client-side request through a public CORS proxy to retrieve the page HTML — your local HTML is never transmitted anywhere.
Resources
- Turndown — GitHub — The JavaScript library powering this converter. Open source, browser-compatible, and highly configurable.
- CommonMark Spec — The authoritative specification for standard Markdown syntax and parsing rules.
- GitHub Flavored Markdown Spec — Official GFM documentation, including table syntax, task lists, and strikethrough.