NewFile

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.

  1. Open TextEdit and choose File → New.
  2. Choose Format → Make Plain Text. The document will now save as a .txt file.
  3. 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.

  1. In Finder, open the folder. If there is no path bar at the bottom of the window, choose View → Show Path Bar.
  2. Control-click the folder’s name in the path bar and choose Open in Terminal.
  3. 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.

  1. Open Automator, choose File → New, select Quick Action, and click Choose.
  2. Set Workflow receives current to files or folders in Finder.
  3. 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.txt in the folder of the front window, and adds a number if that name is taken.
  4. 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.

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.