MDocKit

HTML to MarkdownHTML 转 Markdown

Convert any HTML snippet into clean, readable Markdown with ATX headings, fenced code blocks and tidy lists.

把任意 HTML 片段转成整洁的 Markdown,标题用 ATX 语法、代码块加围栏、列表自动对齐。

What is HTML to Markdown?HTML 转 Markdown 是什么?

A tidy HTML-to-Markdown converter built on Turndown. Paste a fragment of HTML — a table, a documentation block, a scraped article — and get clean Markdown back: ATX-style headings, fenced code blocks, tidy lists and clean link syntax. It is the practical counterpart to the Markdown previewer, and useful whenever you need to move content out of a rich-text editor into a repository or a Markdown-based CMS.

一个基于 Turndown 的整洁 HTML→Markdown 转换器。粘进一段 HTML——表格、文档块、抓取来的文章——得到干净的 Markdown:ATX 标题、围栏代码块、整齐的列表与规范链接语法。它是 Markdown 预览器的实用对偶工具,在需要把内容从富文本编辑器搬进代码仓库或 Markdown 类型的 CMS 时特别好用。

How to use html to markdown如何使用 HTML 转 Markdown

  1. Paste your HTML into the box.
  2. Press Convert.
  3. Review the Markdown and copy it.
  4. If the source is a full page, paste only the content part you care about.
  1. 把 HTML 粘进输入框。
  2. 点"转换"。
  3. 检查 Markdown 并复制。
  4. 若源是整页 HTML,只粘你需要的正文部分。

Common uses常见用途

FAQ常见问题

Does it keep tables?表格会保留吗?

Yes, tables become GitHub-flavoured Markdown tables with a header row. Complex tables with merged cells are flattened, since Markdown has no equivalent.

会,表格会转成带表头的 GitHub 风格 Markdown 表格。带合并单元格的复杂表格会被展平,因为 Markdown 没有对应语法。

How are code blocks handled?代码块怎么处理?

Elements marked as pre or code become fenced code blocks, and a language hint is kept when the source provides one.

标记为 pre 或 code 的元素会变成围栏代码块,源里带语言标注时也会保留。

What happens to inline styles and scripts?行内样式和脚本会怎样?

Presentational attributes are dropped and scripts are removed, because Markdown has no way to express them and carrying them over would produce noise.

表现类属性会被丢弃、脚本会被移除——Markdown 无法表达它们,带过去只会变成噪音。

Is my HTML uploaded?HTML 会上传吗?

No. The conversion runs in the browser.

不会。转换在浏览器内完成。

Other tools其他工具

👁️

Markdown PreviewMarkdown 预览

Write Markdown on the left, see the rendered result with syntax-…

左边写 Markdown,右边看渲染结果,代码块自动高亮,并可一键生成标题目录。…

📄

Markdown to PDFMarkdown 转 PDF

Convert Markdown or HTML into a paginated A4 PDF you can downloa…

把 Markdown 或 HTML 转成分页 A4 PDF 并下载,渲染全过程都…

📘

Word Document PreviewWord 文档预览

Open a .docx file straight in the browser with page breaks, head…

直接在浏览器里打开 .docx 文件,保留分页、页眉页脚与表格排版。…

Sister sites友情链接 MonkeyDev dev tools hub工具总站 FreePDFKit PDF toolsPDF 工具集 ImageToolKit image tools图片工具集 AI 咒语库 AI prompt libraryAI 提示词库 DevTools developer toolkit开发工具箱 CalcKit finance calculators财务计算器 OfficeKit office utilities办公工具箱 AIkit AI & machine learningAI 与机器学习 DataKit data & spreadsheet tools数据与表格工具 ChartKit diagrams & charts图表与可视化