How to create a new text (.txt) file on a Mac
Finder has New Folder but no New File. Here are four ways to get an empty .txt file into a folder. The first three use only what ships with macOS. The fourth is NewFile, the free app this site is about.
1. TextEdit
The built-in route. It is the slowest, because TextEdit starts every document in rich text and you choose the folder in the save dialog.
- Open TextEdit and choose File → New.
- Choose Format → Make Plain Text. The document will now save as a
.txtfile. - Choose File → Save, name the file, and pick the folder you want it in.
To skip step 2 from now on, open TextEdit → Settings → New Document and select Plain text.
2. Terminal
One command, and nothing to set up.
- In Finder, open the folder. If there is no path bar at the bottom of the window, choose View → Show Path Bar.
- Control-click the folder’s name in the path bar and choose Open in Terminal.
- Type this and press Return:
touch "New File.txt"
An empty New File.txt appears in the folder. If a file with that name is already there, touch leaves its contents alone. Change the name or the extension to whatever you need, for example touch notes.md.
3. An Automator Quick Action
Automator, which comes with macOS, can add your own item to Finder’s Quick Actions menu. You set it up once on each Mac.
- Open Automator, choose File → New, select Quick Action, and click Choose.
- Set Workflow receives current to files or folders in Finder.
- Add a Run AppleScript action that creates the file. This recipe by wd006 has a script you can paste: it asks Finder to make
untitled.txtin the folder of the front window, and adds a number if that name is taken. - Save it under the name you want to see in the menu, such as “New Text File”.
Where it shows up: Apple’s guides list a saved Quick Action in Finder’s Quick Actions menu (Control-click a file or folder, then choose Quick Actions), in the Action pop-up menu in the Finder toolbar, and in the Services menu. You can turn Quick Actions on or off in System Settings, under the Finder extensions.
4. NewFile
NewFile is a small, free, open-source Finder extension that adds the missing menu item.
- Right-click in a Finder window and choose New Text File, or click the NewFile button in the Finder toolbar.
- The file is named
New Text File.txt, numbered if that name is taken, and selected so you can rename it straight away. - Other file types are a setting: 8 built-in presets such as
.md,.jsonand.sh, plus your own extensions, each with an optional starter template.
Install it with brew install --cask mariusgm/newfile/newfile or download the DMG, launch it once, and turn on its Finder extension. The home page has the steps. It needs macOS 13 or later.
One limit: inside iCloud Drive folders, including Desktop and Documents when they sync to iCloud, Finder does not show right-click items from third-party extensions. The NewFile toolbar button still works there.
Which one to use
| Method | Setup | Each time | In iCloud Drive | Other file types |
|---|---|---|---|---|
| TextEdit | None | New document, make it plain text, save, pick the folder | Yes | Plain text, rich text, HTML |
| Terminal | None | Open Terminal at the folder, type one command | Yes | Any extension you type |
| Automator Quick Action | A few minutes, once per Mac | Control-click an item, Quick Actions, your action | Not tested by us | One per Quick Action; edit the script |
| NewFile | Install, turn on the extension | Right-click, New Text File | Toolbar button only | 8 presets plus your own, with templates |
Sources
The built-in steps follow Apple’s user guides: TextEdit, Terminal, Quick Actions in the Finder and Automator (the macOS 15 edition). The Terminal command was run on macOS 27, in a local folder and in iCloud Drive.