Word to TXT Converter
Operator: Abdulla Al Fahad. How tools are built and checked
There are jobs for which Word formatting is a liability: feeding a document to a search index or a diff tool, pasting it into a system that only takes plain text, archiving it in a form that will open in fifty years, or handing it to a language model without formatting noise. The Word to TXT Converter reads a .docx and writes UTF-8 plain text that keeps what matters to a reader of text: one blank line between paragraphs, - and 1. markers for list items with two spaces of indentation per level, and table rows with their cells separated by pipes.
The text appears in a preview as soon as the file has been converted; Copy sends it to the clipboard and Download .txt saves it under the document's own name. The output uses line-feed line endings and no byte-order mark, so it opens cleanly in Notepad, TextEdit, a terminal or a code editor.
Key features
- One line per paragraph, a blank line between paragraphs, and manual line breaks preserved inside a paragraph.
- List items marked with - or 1. and indented two spaces per nesting level, with continuation lines aligned under the text.
- Table rows as pipe-separated lines that keep their column count even when cells are merged.
- Rejects legacy .doc and password-protected files with an explanation and reports skipped images and unrecognised styles.
What the text file keeps
Each Word paragraph becomes one line of text, and paragraphs are separated by a single blank line; a manual line break (Shift+Enter) inside a paragraph stays as a line break within it. Headings are written as their text alone, with no underline, numbering or # marks, so a heading looks like a one-line paragraph, and empty spacer paragraphs are dropped. Bulleted items start with - and numbered items with 1., 2., 3., renumbered from 1 for every list; a nested item is indented by two spaces per level, and a continuation line inside an item is indented to sit under the item's text. Quote-style paragraphs become ordinary paragraphs, while text in the Code or HTML Preformatted style keeps its own line breaks and indentation.
Tables are written one row per line, with the cells joined by a space, a pipe and a space. The header row is not marked, a cell that spans several columns is followed by empty cells so the pipes still line up, and a table nested inside a cell is flattened into that cell's text. Bold, italic, underline, strikethrough, colour, highlight, font, size and alignment vanish, and hyperlinks keep only their visible text, so a link that reads the wiki loses its address. Footnote reference numbers stay inline and the notes are written as a numbered list after the body; comments are removed, Track Changes are read as if accepted, and images are counted in a warning but produce no text.
Whitespace follows browser rules, because the Word reader produces HTML on its way to text: runs of spaces and tabs inside a paragraph collapse to a single space, except in the Code styles. Curly quotes, em dashes and non-breaking spaces are kept as they are, and the download is named after the .docx with a .txt extension.
How it works
The first bytes of the file are inspected before anything else: an OLE container, which is what both an old .doc and a password-protected .docx look like, and any file that is not a zip are refused. mammoth then converts the document to HTML with a style map that preserves headings, lists, tables, links and the Quote and Code styles, and the HTML becomes the shared document blocks behind every converter on this site.
The text exporter walks the blocks in order: headings and paragraphs are emitted as their text, list items receive a marker and an indent from their level and a per-level counter, and tables are written row by row with pipes between cells, a blank line between blocks and a single line break between consecutive list items.
Common use cases
- A legal team converts two versions of a contract to text so a diff tool can show exactly which clauses changed.
- A developer indexes a folder of Word specifications in a plain-text search system.
- An editor pastes a chapter into a ticketing system that strips formatting anyway and wants clean paragraphs rather than Word's paste artefacts.
- A researcher extracts interview transcripts from Word for a text-analysis script.
How to use this tool
- Drag the .docx onto the upload area, or click the area and pick the file.
- Check the summary chips: the table and list item counts tell you how many pipe rows and markers to expect in the text.
- Scan the preview for collapsed tab alignment and for links that now read as plain words, and note anything to add back.
- Copy the text for pasting, or save it with Download .txt; unwanted sections can be removed through Edit in Word editor before converting again.
Example
Word document
Heading 1: Onboarding checklist
Normal: Welcome to the team. Your first week is [bold]mostly setup[/bold], see [link]the wiki[/link].
Numbered: Collect your laptop from IT
Set up accounts
(bullets, nested) Email and calendar
Source control
Meet your buddy
Normal: Office address: [Shift+Enter] Unit 4, Mill Lane
Table: Day | Activity (header row)
Monday | Orientation
Tuesday | Team introductionsText output
Onboarding checklist
Welcome to the team. Your first week is mostly setup, see the wiki.
1. Collect your laptop from IT
2. Set up accounts
- Email and calendar
- Source control
3. Meet your buddy
Office address:
Unit 4, Mill Lane
Day | Activity
Monday | Orientation
Tuesday | Team introductionsTips for best results
- Use Word's list formatting rather than typing dashes and numbers; only real list paragraphs receive the - and 1. markers with their indentation.
- Rows written as Day | Activity paste neatly into a spreadsheet with Text to Columns and | as the delimiter, or split on the pipe in a script.
- If link addresses matter, use the Word to Markdown converter instead, which writes [text](url); the plain-text output keeps only the words of a link.
- Press Enter in Word to separate paragraphs and Shift+Enter only for lines that belong together, such as an address. The first gives a blank line in the text, the second a plain line break.
Edge cases to watch
Hyperlink addresses are gone. Only the link text survives, so a document that depends on its URLs should go through Word to Markdown or Word to HTML instead.
Headings cannot be told from paragraphs in the output; a one-line paragraph and a Heading 1 look identical, so documents that need their outline should use Word to Markdown.
Columns aligned with tabs or repeated spaces collapse to single spaces, which breaks hand-made tables and indented code in the Normal style.
Merged table cells leave empty cells in the row, and vertically merged cells leave empty cells in the rows below.
Common errors and how to fix them
- This file is either a legacy .doc or a password-protected document. Open it in Word, remove any password, and save it as .docx, then try again.
- The file carries the signature of an OLE container, which Word uses for both the old .doc format and encrypted documents. Open it in Word, remove any password under File, Info, Protect Document, and choose Save As, picking Word Document (.docx).
- This file is not a Word .docx document. Choose a file saved as .docx.
- A file with a .docx name whose content is not a Word package, typically a renamed PDF, RTF or text file. Export a genuine .docx from the program that made it, or pick the converter on this site that matches the real format.
- This Word file could not be read. Open it in Word, save it again as .docx, and try once more.
- The zip opened but the document inside it is damaged or unusual. Word repairs most such files on opening; save a fresh copy and convert that.
- This converter accepts Word files (.docx), up to 25MB. "notes.odt" has a different extension.
- Only .docx and .doc names are accepted. For an OpenDocument file use ODT to Word first, or save it as .docx from LibreOffice, then convert it to text here.
Best practices
- Decide what the text is for before converting: plain text suits search, diffs, scripts and archives, while headings or links that must survive call for Markdown.
- Accept or reject pending tracked changes in Word before converting; the text shows the document as if every change had been accepted, with nothing to mark the revisions.
- Check the first table and the first list in the preview; those two structures are where a document's authoring habits show up as surprises.
Diffing two versions of a contract
Convert each version separately and save them as, say, agreement-v3.txt and agreement-v4.txt, then compare them with any line-based tool: the compare command in VS Code, diff -u in a terminal, or a desktop diff viewer. Because every paragraph is one line, each changed clause shows up as one changed line with the old and new wording side by side, instead of the cascade of re-wrapped lines a Word export produces, and a clause that merely moved shows as a deletion in one place and an insertion in another.
Two habits make the comparison cleaner: set the diff tool to ignore whitespace changes, so a tab replaced by a space does not register, and treat table rows with care, since a changed figure in a schedule appears as a changed pipe-separated line but a row added mid-table shifts every row below it. Word's own Compare remains the right tool when formatting changes matter; the text diff is for finding changed wording quickly.
Frequently asked questions
Why have my hyperlinks turned into ordinary words?
Plain text has no way to attach an address to a word, so only the link text is written. Use Word to Markdown to keep links as [text](url), or Word to HTML for anchor tags.
Can it open an old .doc file?
No. The 1997-2003 format is refused with a message asking you to save the file as .docx in Word, which takes a moment and loses nothing.
Which encoding and line endings does the file use?
UTF-8 without a byte-order mark and line-feed endings, which current Notepad, every macOS and Linux editor and every programming language read without configuration.