HTML to Markdown Converter
Convert HTML to clean Markdown. Handles headings, lists, links, images, tables, code blocks and more. Free, browser-based, no upload.
内容仅供参考。
拖放文件到此处,或点击选择
支持: .html, .htm, .txt · 最大: 20MB
📘 使用方法
指南暂为英文,中文翻译即将上线。
How to Convert HTML to Markdown
What This Tool Does
The HTML to Markdown Converter takes any HTML — a full page, a fragment, a blog post, an email — and produces clean, readable Markdown. It handles headings (H1-H6), paragraphs, bold/italic, links, images, ordered and unordered lists, nested blockquotes, tables, and code blocks (inline and fenced). The output is ready to paste into any Markdown-based system: GitHub, Notion, Obsidian, Hugo, Jekyll, or a README.
Why Convert to Markdown?
HTML carries a lot of weight: tags, attributes, inline styles, classes, scripts, comments. Markdown strips all that to content semantics — what is a heading, what is a list, what is a link — and produces text that is readable and editable in any editor. Teams migrate from CMS-driven HTML to Markdown-based static site generators. Documentation teams export Confluence/Word HTML to Markdown for Git workflows. Content teams strip email formatting before pasting into wikis. Anyone who has tried to clean up HTML-pasted-from-Word by hand knows the value of an automated converter.
How to Use
- Paste your HTML into the input area, or drop a .html file.
- Choose heading style: ATX (# Heading) is the most widely supported; Setext (underlined) is older.
- Choose bullet marker: - is the most common, * is also widely used, + is less common but valid.
- Choose code block style: Fenced (```) is the modern standard; indented (4-space) is the original Markdown spec.
- Click Convert and download the .md file or copy the preview.
What Gets Preserved
- Headings, paragraphs, bold, italic, strikethrough
- Links with text and URL
- Images with alt text and URL
- Ordered and unordered lists (including nested lists)
- Tables (converted to GitHub-flavored Markdown pipe tables)
- Blockquotes (including nested)
- Code blocks and inline code
- Horizontal rules
What Gets Dropped
- Inline styles (color, font, spacing) — Markdown has no concept of styling
- Script tags, style tags, and HTML comments
- Class names and IDs (unless inside a code block)
- Form elements and interactive widgets
- iframe and embed content
Privacy
All parsing and conversion happens in your browser. The HTML is processed by Turndown, a widely-used JavaScript HTML-to-Markdown library, running locally inside a Web Worker. Your content never leaves your device — safe for internal documentation, draft blog posts, and email templates.
❓ 常见问题
Are HTML tables converted to Markdown?
Yes. Tables are converted to GitHub-flavored Markdown pipe tables. Complex tables with colspans or rowspans are simplified — Markdown pipe tables do not support cell merging.
What about inline styles and CSS?
Inline styles are stripped — Markdown has no concept of styling. Only structural and semantic elements (headings, lists, links, emphasis) are preserved.
Is my HTML uploaded to a server?
No. Conversion runs entirely in your browser using Turndown inside a Web Worker. Your HTML never leaves your device.
Does it handle nested lists and blockquotes?
Yes. Nested lists are converted with proper indentation, and nested blockquotes use multiple > prefixes. The converter handles reasonable nesting depth.