The text file (.TXT) contains unformatted text with the .txt file extension (for example, macreports.txt). By unformatted formatting, this type of text file is a plain text file without any formatting and styling, for example, these documents do not contain bold text, italic text, images, colors, different font types, hyperlinks, tables, bulleted lists, etc but these documents contain clear text. You can create, open, and edit a TXT file on your Mac using a text editor. An example of a text editor is TextEdit, which is included with macOS.
Text file on Mac
A text file is one of the simplest file types you can create on a computer. It can be opened by many different programs and does not include any special formatting, fonts, images, or other embedded data. You can create one with any OS for desktop, laptop or smartphone on the market.
Still, there are differences between text files. Files can contain different character encodings, which indicate how other characters and symbols, such as emoji, are translated into numerical systems that computers use to store data. Common notations in the United States include ASCII and Unicode, but other notations are used elsewhere in different languages.
Most Mac text processing software and other tools can automatically detect file encryption, but if you use the wrong encoding, the file may be completely or partially illegible.
1. Using TextEdit
TextEdit is a very known and popular application that can be used to create and edit text files on every Mac. It is included with all versions of macOS and OS X. Follow the given steps to open and use TextEdit and create a text file on Mac
- TextEdit is a word editing and word processing tool that comes with your Mac, start the process by opening the TextEdit app on your Mac (Applications> TextEdit, or use Spotlight, press Command-Space bar, to search, and search for TextEdit).
- In the TextEdit application, choose File> Open. TextEdit has two formatting modes: (a) plain text (.txt file) and (b) rich text (.rtf file). The difference is that .txt mode will not allow formatting, while .rtf mode allows you to format such as adding images, colors, tables, etc.
- The default format is Rich Text Format. You can change this by going to TextEdit> Preferences and selecting Plain Text.
- You can also change the mode while editing your text by going to Format> Create Plain Text or Format> Create Rich Text. If you change the .rtf (rich text) file to a .txt (plain text) file, your document will lose all formatting options.
- Create and edit your text file
- Then go to File> Save to save your text file.
- Name your file and save it.
You can also create richer documents, and you can use iCloud pages or pages or similar apps. Another note is that text files are also known as flat files or ASCII files.
2. Create a file from the terminal application
If you are not afraid to be more technical, you can use the terminal application to create files.
Since the goal of creating a file after browsing to the folder in the Finder app, we start by enabling the Terminal app for the current Finder folder.
Here are the steps to enable Terminal:
- Open System Preferences either from LaunchPad or from Spotlight Search.
- To launch it from Spotlight Search, press Command-Space to bring it in. In the search bar, type System Preferences (autocomplete will complete so you don’t need to type the entire word).
- In System, click Keyboard Icon Preferences.
- Click the Shortcuts tab.
- In the right pane of the box, click Services.
- Search for “New Workstation in Folder” under the “Files and Folders” section.
- Make sure the checkbox is selected.
- Close the window.
- Now browse to the folder you need.
- Right-click the folder and the context menu will include the Services option at the bottom will appear. This option includes different commands available for the current folder. Click “New Station in Folder”, the option that we just enabled in System Preferences.
- A new terminal window opens with the current folder set to the folder you selected in the Finder application.
- In Terminal type: Touch
For example, if I wanted to create a new text file on Mac called MyTextFile.txt, I would type: Touch MyTextFile.txt
You should see a new file appear in the Finder, now you can right-click the file and either click Open which will open the file using the TextEdit application or select the Open With option. If you have some text editors like Atom or Microsoft Word, you can choose one using the Open With option.
3. Create Txt File on Mac using third party software
The problem of adding new files seems very common, and I don’t understand why Apple is reluctant to add the option to create new files to the right-click menu. And you know that many people are annoyed by this situation because there are many commercial applications created for the sole purpose of solving the problem.
One of them is a free tool called “New File List”. To install it, do the following:
- Start the App Store
- Type a new file list for free in the search bar
- In the search results, find the New File Menu app and click Get
- After installation, MacOS will request the extension
- Click the Open System Preferences button
- In the system, preferences enable a checkbox called Finder Extensions in the NewMenuFileFree section
The disadvantage of the free version of the app is that it only allows the creation of one type of file. If you’re mostly creating Word files, you can choose a Word document from templates, but in this case, you won’t be able to create text files from the context menu. The good news is that if you need more templates than you can install the paid version of the app.
There are many ways to add and create text (.TXT) files to your Mac. We have reviewed only 3 of them, but any solution should be sufficient and not difficult to implement.