Create Blank Text File on Mac: 5 Quick Ways
To create a blank text file on a Mac, you can use the built-in TextEdit app, the Terminal command line, or a quick keyboard shortcut in Finder. This article walks you through each method step by step, so you can pick the one that fits how you work.
Why You Might Need a Blank Text File
Blank text files are useful for many everyday tasks: jotting down quick notes, storing configuration snippets, creating a placeholder in a folder, or preparing a file for a script. Unlike word processor documents, a plain text file has no formatting—no bold, no fonts, no margins—just raw characters. That makes it ideal for code, logs, and anything another program will read.
Method 1: Using TextEdit (The GUI Way)
TextEdit is the default text editor on macOS. To create a blank text file with it:
- Open TextEdit from the Applications folder or via Spotlight (press Cmd+Space and type “TextEdit”).
- If a new document doesn’t open automatically, go to File > New (or press Cmd+N).
- Go to Format > Make Plain Text (or press Shift+Cmd+T) if the document is in rich text mode.
- Press Cmd+S to save, choose a location, and give it a name ending in
.txt(e.g.,notes.txt).
That’s it. The file will be saved as a plain text file. If you forget to switch to Plain Text mode, TextEdit will save it as a rich text file with a .rtf extension, which is not what you want for a blank text file.
Method 2: Using Finder and a Keyboard Shortcut
Finder doesn’t have a built-in “New Text File” option like Windows Explorer does for some file types. But you can create one with a simple Automator service or a third-party app. Here’s a no-install approach using Terminal (see Method 3) or a quick AppleScript shortcut.
If you prefer a keyboard shortcut in Finder, you can create a service with Automator:
- Open Automator (in Applications).
- Choose New Document and select Quick Action.
- Set “Workflow receives current” to files or folders in Finder.
- Add a Run Shell Script action with the command
touch "$1/untitled.txt". - Save it with a name like “New Text File”.
Now, when you right-click a folder in Finder, you’ll see “New Text File” in the Quick Actions menu. This creates an empty file named untitled.txt in that folder.
Method 3: Using Terminal (The Command Line Way)
The fastest way for many users is the Terminal. Open Terminal (from Applications/Utilities or Spotlight) and use the touch command:
touch ~/Desktop/blank.txt
This creates an empty file named blank.txt on your Desktop. You can specify any path. To create a file in the current directory, just type touch filename.txt.
If you want to create a file with some initial content, use echo:
echo "Hello" > hello.txt
That writes “Hello” into a new file. To append instead of overwrite, use >>.
Method 4: Using a Text Editor Like VS Code or Sublime
If you already use a code editor, creating a blank text file is trivial. In Visual Studio Code, press Cmd+N for a new file, then Cmd+S to save it with a .txt extension. In Sublime Text, the same shortcut works. These editors default to plain text, so there’s no rich text conversion to worry about.
Method 5: Using the “New File” Menu in Some Apps
Some third-party file managers (like ForkLift or Commander One) include a “New File” option in their toolbar or right-click menu. If you use one of these, you can create a blank text file directly from the file list without touching the keyboard.
Common Problems and How to Avoid Them
- File saves as .rtf instead of .txt – In TextEdit, always check Format > Make Plain Text before saving. You can also set TextEdit to default to plain text in Preferences (Settings) under “New Document”.
- File is hidden – Files starting with a dot (like
.gitignore) are hidden by default. To see them in Finder, press Cmd+Shift+. (period). - Can’t create a file in a protected folder – System folders (like /Library) require administrator privileges. Use
sudo touchin Terminal, but be careful. - TextEdit opens rich text by default – Change the default in TextEdit > Settings > New Document > Format > Plain Text.
Frequently Asked Questions
How do I create a blank text file on Mac without TextEdit?
Use Terminal with the touch command. For example, touch ~/Desktop/blank.txt creates an empty file on your Desktop. This works in any directory and is the fastest method if you’re comfortable with the command line.
Why can’t I create a text file with right-click on Mac?
Finder doesn’t have a built-in “New Text File” option. You can add one via Automator (as described above) or use a third-party app. Alternatively, use TextEdit or Terminal.
What is the difference between .txt and .rtf?
A .txt file contains only plain text with no formatting. An .rtf file can include bold, italics, fonts, and colors. For blank text files, you want .txt. TextEdit defaults to .rtf, so you must switch to Plain Text mode.
Can I create multiple blank text files at once?
Yes, in Terminal you can type touch file1.txt file2.txt file3.txt to create several files in one command. In TextEdit, you’d have to save each one separately.
How do I create a text file with a specific name and location?
In Terminal, specify the full path: touch /path/to/your/folder/name.txt. In TextEdit, use the Save dialog to navigate to the folder and type the name.
Is there a way to create a text file from the share menu?
Not directly. But you can select text in any app, copy it, and then use Terminal with pbpaste > file.txt to paste the clipboard contents into a new text file.
Related
Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.