Word to TXT
Extract the body text from .docx / .doc / .rtf / .html into a UTF-8 .txt with BOM that Notepad opens directly
为什么这个工具要上传文件?
本站其余工具都在你的浏览器里本地处理、文件不出本机;但把 Office 文档解析成纯文本需要**文档解析引擎**:.doc 是 Word 97-2003 的老式二进制格式,浏览器基本读不了;.docx 虽然本质是个 zip 包,但要正确处理样式、表格、页眉页脚与各种编码,兼容性风险很大。所以这一类工具统一走服务端的 LibreOffice 引擎(与本站 Word/Excel/PPT 转 PDF 同一个通道)。
上传的文件只用于这一次转换:不写入数据库、不留存在服务器(转换完成立即删除)、不上传到任何第三方、不会被任何人看到、不用于其它用途。
提取的是纯文本:没有图片、没有字体颜色与排版、表格会退化成文字行。要保留版式请用「Word 转 PDF」;要提取 PDF 里的文字请用「PDF 提取文字」。
把文档拖到这里,或点击选择
支持 .docx / .doc / .rtf / .html;单文件不超过 20MB;PDF 请用「PDF 提取文字」
提示:常见文档几秒到十几秒。转换失败会给出原因(扩展名与内容不符、文件损坏、超时、次数已达上限等),可直接重试。
提取出来的是什么(效果边界)
只有文字。输出是一份纯文本 .txt:字体、字号、颜色、加粗斜体、段落缩进、分栏、页边距等版式信息全部不会保留,图片与图表会直接丢失。
表格会退化成文字行。表格不再有行列结构,单元格文字会变成普通文本行(列与列之间可能是制表符或空格,具体形态取决于原文档),复杂表格通常需要手工整理。
文本框、页眉页脚、脚注与批注收在文末。解析引擎的纯文本导出只写正文,所以 .docx / .doc 里文本框与形状里的段落、页眉、页脚、脚注、尾注、批注由服务端单独读出来,统一放在 .txt 末尾并按【文本框】【页眉】【页脚】【脚注】【尾注】【批注】分小节,不插回原来的位置;原文档里没有的那类不会出现小节。两处实测确实取不到:.rtf 的文本框与页眉页脚、.html 里用 CSS 绝对定位摆放的那一层文字。
编码是 UTF-8 带 BOM。Windows 记事本、Notepad++、VS Code、Word / WPS 直接打开都不会乱码;用 Excel 打开建议走「数据 → 从文本/CSV」并选 UTF-8。
Privacy note:文件仅用于这一次转换——不写入数据库、不留存服务器(转换完成立即删除)、不上传到任何第三方。
FAQ
Yes, but only for this one conversion. Parsing .docx / .doc / .rtf / .html into plain text needs a document engine: .doc is Word 97-2003's legacy binary format that browsers essentially cannot read; .docx is a zip under the hood, but handling styles, tables, headers, footers and the various encodings correctly carries a big compatibility risk. So this family of tools goes through the server-side LibreOffice engine (the same channel as our Word/Excel/PPT to PDF). The uploaded file is used only for the conversion: deleted immediately when done, never written to a database, never retained, never used for anything else. All other tools on this site (images, PDF, text, QR codes and so on) still run entirely in your browser - those files never leave your machine.
What you get is plain text - words only. Pictures, charts and shapes are all lost (text written inside shapes is still extracted); fonts, sizes, colors, bold and italines are not kept; tables degrade into plain text lines where columns may be separated by tabs or spaces (depending on the source document), and complex tables usually need manual tidying. Text boxes, headers, footers, footnotes, endnotes and comments in .docx / .doc lose no words, but they are not put back in place: they are collected at the end of the document under subsections (text boxes / header / footer / footnotes / endnotes / comments), and a subsection only appears if the source has that kind of content. Two places verifiably cannot be extracted: text boxes and headers/footers in .rtf (the engine cannot even read them when converting to PDF) and text positioned by CSS absolute positioning in .html. Hyperlinks usually keep only the link text; the URL itself is not guaranteed. If you need the layout, use 'Word to PDF' instead.
The output is a UTF-8 .txt with a BOM: Windows Notepad, Notepad++, VS Code, Word / WPS all open it without mojibake. In Excel, use the import path (Data -> From Text/CSV) and pick UTF-8; double-clicking with an older Excel may parse it with the local codepage - in that case open and re-save it once with Notepad first. The file name defaults to the original name plus .txt.
Four inputs are supported - .docx, .doc (Word 97-2003), .rtf, .html - and the output is always .txt. PDF is out of scope: a PDF's layout is coordinate-based, not flowing text, and feeding PDF to the document engine verifiably yields an empty result, so this page explicitly refuses PDF - to extract PDF text use 'PDF extract text'. One file up to 20MB; each IP has hourly and daily conversion quotas (exceeding them shows a try-later notice); failures come with plain-word reasons (extension does not match content, corrupted file, conversion timeout, service busy and so on) - you can retry or shrink the file first.