To create a TXT file on a Mac, open a new document in TextEdit, choose Format > Make Plain Text, enter your text, then choose File > Save and name the file with a .txt extension. TextEdit is built into your Mac, so you can complete the task without downloading another editor.
The short version
- Start with TextEdit: Create a document, choose Format > Make Plain Text, and save it with a .txt filename.
- Use the keyboard: In a new rich-text TextEdit document, press Shift + Command + T to switch to plain text.
- Keep original formatting: Save a separate copy before converting an existing formatted document to plain text.
- Create an empty file: Terminal’s
touchcommand creates a missing file without emptying an existing one.
| Method | Best use | What to remember |
|---|---|---|
| TextEdit | Create or convert a text document | Choose plain text before saving |
| Finder duplication | Reuse an existing TXT file | Edit the copy’s contents |
Terminal with touch | Create an empty TXT file | An existing file keeps its contents |
Terminal with nano | Write text in Terminal | Save before exiting the editor |
| Pages | Export a word-processing document | Only body text exports |
| Word for Mac | Save a Word document as TXT | Choose the plain-text format |
| Google Docs | Download document text | Download permissions must allow export |
Create and save your file in TextEdit
Open TextEdit and click New Document if the opening dialog appears; otherwise, choose File > New. Choose Format > Make Plain Text before typing or pasting your content.
When your text is ready, choose File > Save. Enter a filename ending in .txt, such as notes.txt, then choose a destination in Where. Click Save to create the file in that location.
For a keyboard workflow, press Command + N in TextEdit to create a document. If it is rich text, press Shift + Command + T to make it plain text, then enter your content. Press Command + S, enter a .txt filename, choose the location, and click Save.
Make plain text the default
In TextEdit 1.20 on macOS 27, choose TextEdit > Settings > New Document. Under Format, select Plain text. This setting controls new documents, so create a new document after changing it, enter your content, and use File > Save to save it with a .txt filename.
In the same version of TextEdit, you can also have the app add the extension automatically. Choose TextEdit > Settings > Open and Save, then under When Saving a File, select Add “.txt” extension to plain text files. This setting controls the filename extension; it does not convert rich text into plain text.
Convert an existing document to TXT
To keep the original document, make a separate copy before converting it. In TextEdit on macOS 27, open the document, hold Option, and choose File > Save As. Give the copy a different name and click Save.
Converting the copy to plain text removes its formatting, while the original retains it. In the copy, choose Format > Make Plain Text, then choose File > Save. The conversion changes the document’s format; the automatic .txt extension setting only handles its filename.
Duplicate a TXT file in Finder
If you already have a TXT file, select it in Finder and choose File > Duplicate, or press Command + D. Rename the copy and open it in TextEdit.
Replacing the copy’s contents removes that text from the copy, while the original file keeps it. Replace the contents as needed, then save the edited copy. To create a copy in another folder instead, hold Option while dragging the original into that folder.
Create a TXT file in Terminal
Use Terminal’s touch command when you want an empty TXT file. It creates a missing file, but if the file already exists, it updates its timestamps without emptying its contents.
Open Terminal and enter the following command, then press Return. It creates notes.txt on your Desktop if that file is not already there.
touch ~/Desktop/notes.txtSubstitute your desired path and filename to create the file elsewhere. Put quotation marks around paths that contain spaces.
To enter text in a Terminal editor, use nano. Enter the following command and press Return to open notes.txt on your Desktop in the editor.
nano ~/Desktop/notes.txtType your text, then press Control + O to write the file. Press Return to accept its filename, then press Control + X to exit. Follow the editor’s displayed key hints if your installed implementation differs.
Export text from an app you already use
In Pages for Mac, open a word-processing document and choose File > Export To > Plain Text. Click Save, enter a filename, choose the destination using Where, then click Export. The export includes only body text, leaving out text boxes, tables, charts, shapes, and images.
Pages page layout documents cannot export as TXT. If you need to create a new TXT file instead, use a plain-text document in TextEdit.
In Word for Microsoft 365 for Mac or Word 2024 for Mac, create or open a document and choose File > Save As. Enter its name in Save As, choose the plain-text format in the File Format list, and click Save. If the dialog is showing online locations, click On My Mac to save locally.
For Google Docs in your Mac browser, open the document and choose File > Download. Select the plain-text (.txt) format to download its text. You need download permissions that allow the document to be exported.
Frequently Asked Questions
How do you create a completely empty TXT file?
Use Terminal’s touch command, such as touch ~/Desktop/notes.txt. It creates the file if it does not already exist; if the file already exists, it updates its timestamps without emptying its contents.
Which document formats can TextEdit open for conversion?
In TextEdit on macOS 27, you can open Word, OpenDocument, RTF, and HTML documents. You can convert these documents to plain text after opening them.
Can you choose the encoding for a plain-text file?
Yes, TextEdit 1.20 on macOS 27 includes encoding controls. Choose TextEdit > Settings > Open and Save, then use the Plain Text File Encoding controls to configure the encoding.
Can you save an email as a text file on your Mac?
Yes, you can export existing email as plain text in Mail on macOS 27. Select one or more messages or conversations, choose File > Save As, and choose Plain Text. Specify the filename and destination, then save.