文件格式任意转换助手Transfer Any File

离线 · 无上传 · 浏览器本地完成Offline · no uploads · runs in the browser

Word 转纯文本(.docx → .txt)——离线、保编号与表格Word to plain text (.docx → .txt) offline

要把一份 Word 文档塞进只吃纯文本的地方——工单系统、终端输出、diff 对比、另一个编辑器的正文框——需要的是「去掉样式但留下结构」,而不是把整篇变成一串没有换行的字。这条链路是 Word → HTML → 纯文本:mammoth 先把文档变成语义化 HTML,再由一个遍历 DOM 的提取器写成文本。因此它比「正则去掉标签」那类做法多保住几样东西:编号、表格的分列、列表的层级,以及链接的地址本身。Pasting a Word document somewhere that only accepts plain text — a ticket, a terminal, a diff, another editor’s body field — needs the styles gone but the structure kept, not one long unbroken line. This route is Word → HTML → plain text: mammoth turns the document into semantic HTML and a DOM walk writes it out as text. That is why it keeps several things a regex tag-stripper loses: numbering, table columns, list nesting, and the link targets themselves.

左右对照的预览与编辑视图
左右对照预览,下载前直接改Preview side by side, edit before you download

这条链路怎么走How the route runs

Word (.docx)Word (.docx) HTMLHTML 纯文本 (TXT)plain text (TXT)

共 2 步,由扩展的路径搜索自动选出,中间产物不落盘。2 steps, chosen by the extension's own path search; intermediate results never touch the disk.

会保留什么What carries over

  • 有序列表按位置重新写出 `1.` `2.`:编号不是文档里的文字,正则式提取会把带编号的步骤变成无编号的段落,这里不会Ordered lists are rewritten as `1.` `2.` from each item’s position: numbering is not text in the document, so a regex extraction turns a numbered procedure into an unnumbered one and this does not
  • 表格写成制表符分隔的行(每个单元格后一个制表符,行末换行),粘进别的表格或对齐文本编辑器还能分列Tables become tab-separated rows (a tab after each cell, a newline at the row end), so they still split into columns when pasted elsewhere
  • 嵌套列表按层缩进两个空格(最深取到 6 层,再深只是不再多缩,编号仍继续),纯文本里唯一的层级线索就是缩进Nested lists indent two spaces per level, capped at six — deeper nesting stops gaining blanks but keeps counting, since indentation is the only hierarchy plain text has
  • 链接把地址附在文字后面(`文字 [https://…]`),锚点与 mailto: 不附——它们本来就不是外部地址Links carry their target after the words (`text [https://…]`); in-page anchors and mailto: do not, because neither is an outside address

如实说明的限制What it does not do

  • 版式全部让位给文本:字体、字号、颜色、页边距、分栏都不在产物里,图片只留下 `[Image]` 或 `[Image: 替代文字]` 这样一行Layout gives way to text: fonts, sizes, colours, margins and columns are not in the output, and a picture leaves behind one line — `[Image]` or `[Image: alt text]`
  • Word 的「从 N 开始」与逐段重启的编号不会带过来——HTML 那一步不写 `start`,所以列表总是从 1 开始数A list set to “start at N”, or one that restarts mid-document, does not survive that far: the HTML step carries no `start`, so numbering always begins at 1
  • 脚注与批注会变成上标的「↑」与正文末尾多出的一段编号列表:那是转换层写进 HTML 的结构,纯文本只能照抄Footnotes and comments arrive as a superscript `↑` plus a numbered list appended to the end — that is how the HTML step represents them, and plain text can only copy it
  • 列表的 `type`(字母 / 罗马数字)与 `reversed` 被忽略——纯文本没有可回读的那种编号,位置才是信息A list’s `type` (letters, roman numerals) and `reversed` are ignored: plain text has no numbering scheme to read back, so position is the information
  • 靠脚本或域代码动态生成的内容(目录、交叉引用、字段结果)取到的是文档里存的静态文字,域代码本身不进产物Anything a field or script generates dynamically (a table of contents, cross-references) comes across as the static text stored in the document; the field code itself does not travel
  • 两条路都读不出内容时(正文为空,且没有可还原的内嵌 MHT)直接报「没有可转换的内容」,而不是交出一份空文件报成功When neither pass yields a body — no readable text, and no embedded MHT that can be recovered — it fails with «no convertible content» rather than reporting success on an empty file

实操提示Working with it

  • 一批最多 200 个文件,单个文件上限 100 MB;多个 .docx 一起转逐个产出各自的 .txt,想一次拿走就打成一个 ZIPUp to 200 files per batch and 100 MB per file; several .docx files yield one .txt each, and the set can be taken as a single ZIP
  • 本扩展自己产出的 .docx(HTML 转 Word 那条路的 altChunk 文档)也能读回来:mammoth 处理不了 altChunk,所以有一道专门的还原步骤去把内嵌正文取出来Files this extension produced itself (the altChunk documents from HTML to Word) read back too: mammoth ignores altChunk, so there is a dedicated recovery step that pulls the embedded body out
  • 要保留结构而不仅是文本,走 Word 转 HTML 或 Word 转 Markdown;要「长得跟原件一样」,走 Word 转 PDFFor structure rather than bare text, take Word to HTML or Word to Markdown; for something that looks like the original, take Word to PDF

常见问题Questions people actually ask

表格会变成一串没有分隔的文字吗?Will the table collapse into one run of text?

不会。每个单元格后面写一个制表符、每行末尾换行,所以粘进支持制表符的地方还能分列。要的是真正的表格文件,那就走 Word 转 Excel 或先转 HTML。No. Each cell is followed by a tab and each row ends with a newline, so pasting into anything tab-aware still gives you columns. For a real table file, take Word to Excel or go through HTML.

为什么目录的页码没了?Why did the table of contents lose its page numbers?

Word 的目录是域:页码由 Word 在打开时重算,文档里存的是上一次的静态文字。这条链路读的是文档里存的东西,所以目录会变成一行行文本(可能带着旧页码),而不是一个能更新的目录。要能更新的目录,得留在 Word 格式里。A Word table of contents is a field: Word recomputes the page numbers when it opens the file, and what is stored is last run’s static text. This route reads what is stored, so the contents comes out as lines of text — possibly with stale numbers — rather than a live table. A table of contents that updates has to stay in Word.

合同的 Word 转成文本,会被上传吗?If I turn a contract into text, is it uploaded?

不会。解析(mammoth)与提取都在扩展的标签页里跑,manifest 只有 storage 权限、没有 host 权限,产物里也没有把远端资源当代码执行的路径;除了你拖进来的文件,没有别的数据来源。No. Parsing (mammoth) and extraction both run inside the extension’s tab; the manifest carries the storage permission and no host permissions, and the bundle ships no path that executes remotely hosted code. Apart from the files you drop in, there is no other source of data.

不需要账号,也不需要联网:装好扩展后点图标,在新标签页里打开工作台,文件从磁盘直接选。No account and no network: install the extension, click its icon, and the workbench opens in a new tab reading straight off your disk.