To batch convert DOCX files to TXT on a Mac, you can use the built-in textutil command in Terminal, Automator, AppleScript, or a free app like Pages or Calibre. The fastest method is a single Terminal command that converts every .docx file in a folder to .txt in one go.
Why Convert DOCX to TXT?
DOCX is the default format for Microsoft Word and many other word processors. It stores formatting, images, and metadata in a compressed XML structure. TXT is plain text with no formatting, no images, and a very small file size. People convert DOCX to TXT for several reasons:
- To import text into software that only accepts plain text (e.g., some databases, code editors, or e-readers).
- To reduce file size when only the words matter.
- To make files easier to search with command-line tools like
grep. - To strip out hidden metadata (like author names or track changes) before sharing.
- To create a clean backup of the text content that will open on any device for decades.
Method 1: Using textutil in Terminal (Fastest)
macOS includes a command-line tool called textutil that can convert between many text formats, including DOCX and TXT. It is installed by default on every Mac.
- Open Terminal (find it in Applications > Utilities).
- Change to the folder that contains your DOCX files. For example:
cd ~/Documents/MyDocs - Run this command to convert all .docx files in the current folder to .txt:
for f in *.docx; do textutil -convert txt "$f"; done
That loop takes each .docx file, converts it to .txt with the same base name, and saves it in the same folder. The original .docx files are left untouched.
Method 2: Automator Quick Action (No Terminal)
If you prefer a graphical interface, Automator can create a drag-and-drop converter that appears in the right-click menu.
- Open Automator (from Applications).
- Choose “New Document� and select “Quick Action�.
- Set “Workflow receives current� to “files or folders� in “Finder�.
- Add a “Run Shell Script� action.
- Set “Shell� to
/bin/bashand “Pass input� to “as arguments�. - Paste this script:
for f in "$@"; do textutil -convert txt "$f"; done - Save it with a name like “Convert to TXT�.
Now you can select any number of DOCX files in Finder, right-click, and choose “Quick Actions > Convert to TXT�. The TXT files appear next to the originals.
Method 3: AppleScript with Microsoft Word
If you have Microsoft Word installed, you can use AppleScript to open each DOCX and save it as plain text. This method preserves more of the original text encoding options and can handle files that textutil might stumble on (though that is rare).
- Open Script Editor (in Applications > Utilities).
- Paste this script:
set inputFolder to choose folder "Choose folder with DOCX files"
tell application "Finder" to set theFiles to every file of inputFolder whose name extension is "docx"
repeat with f in theFiles
tell application "Microsoft Word"
open f
set docPath to (POSIX path of f) as text
set txtPath to text 1 thru -6 of docPath & ".txt"
save as active document file name txtPath file format format text
close active document saving no
end tell
end repeat - Run the script. It will ask you to choose a folder, then convert every DOCX in it.
This method is slower because it launches Word for each file, but it gives you Word’s exact text conversion options.
Method 4: Pages (Free, GUI)
Apple’s Pages app (free on every Mac) can open DOCX files and export them as plain text. To batch convert, you still need to do it one by one, but it is a simple drag-and-drop process.
- Open Pages.
- Drag a DOCX file onto the Pages icon in the Dock.
- Go to File > Export To > Text…
- Choose a location and click Export.
Repeat for each file. This is not true batch conversion, but it works without any scripting knowledge.
Method 5: Calibre (For E-books, but Works)
Calibre is a free e-book manager that can convert DOCX to TXT in bulk. It is overkill for simple text conversion, but if you already have it installed, it is a reliable option.
- Open Calibre.
- Click “Add books� and select all your DOCX files.
- Select all the added books in the library.
- Click “Convert books� and choose “TXT� as the output format.
- Click OK. The TXT files will appear in the library.
To get the actual files, right-click a book and choose “Open containing folder�.
What textutil Does and Doesn’t Convert
textutil is a general-purpose text converter. It reads DOCX, DOC, RTF, HTML, and plain text, and can write to TXT, HTML, RTF, and DOC. It uses macOS’s text engine, so it handles most formatting well. However, it does not extract images, tables are flattened into tab-separated text, and complex layouts may lose their visual structure. For most documents where you just need the words, it is perfect.
One common misconception is that textutil will preserve line breaks exactly as they appear in Word. In reality, it converts paragraphs to newlines and ignores manual line breaks (Shift+Enter) unless they are stored as separate paragraphs. If you need to preserve every line break, you may need to use Word’s “Save As� with “Insert line breaks� option, which textutil does not offer.
Frequently Asked Questions
Will the original DOCX files be deleted?
No. All the methods above create new .txt files and leave the original .docx files untouched. If you want to delete the originals after conversion, you can do that manually or add a rm command to the loop, but be careful.
How do I convert DOCX files in subfolders as well?
Use the find command to process files recursively. In Terminal, run:find . -name "*.docx" -exec textutil -convert txt {} \;
This converts every DOCX in the current folder and all subfolders, saving the TXT files alongside each original.
Can I convert DOCX to TXT with a specific encoding (like UTF-8)?
Yes. textutil defaults to UTF-8, which is fine for most modern text. If you need a different encoding, you can use the -encoding option, but the available encodings are limited. For full control, use Word’s Save As dialog, which lets you choose from many encodings.
Why does my TXT file have weird characters or missing text?
This usually happens when the DOCX contains characters that don’t map to plain text, such as smart quotes, emojis, or special symbols. textutil does its best, but some characters may be dropped or replaced. If this is a problem, try converting with Word or Pages instead, as they handle Unicode more robustly.
Is there a way to batch convert without installing anything?
Yes. textutil and Automator are built into macOS, so you don’t need to install anything. Pages is also pre-installed on most Macs. The Terminal method is the most direct and requires no extra software.
Can I convert .doc (old format) files the same way?
Yes. textutil supports .doc as well. Just change the file extension in the loop to *.doc or use *.doc* to catch both .doc and .docx.
Related
Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.
More cards in this drawer
- Second Wind Quest Walkthrough: Where Winds Meet6.00 min/km
- Enshrouded Weapon Upgrade Guide: How to Improve Gear5.00 min/km
- Connect Phone to Controller for Cloud Gaming
- Python Search Highlighting: Snippets & Matches
- Secure Boot Battlefield 6 ASUS: Fix & Enable Guide
- Best Tech Websites to Follow for Pros & Beginners