Home > How to Tips

[2024]How to Create/Open A Text(TXT) File on A Mac

Updated on Monday, April 29, 2024

iBoysoft author Amanda Wong

Written by

Amanda Wong
Professional tech editor

Approved by

Jessica Shee

English Français Deutsch やまと Español Português

Complete Guide on How to Create TXT Files on Mac in Multiple Ways

Summary: This post guides you to create a TXT file on your Mac in several ways, including the macOS built-in TextEdit and Automator apps, via the Terminal commands, or use iBoysoft MagicMenu to quickly and easily create a new text file from the right-click menu.

how to create a txt file on mac

A text (TXT) file is a plain text, containing unformatted text with the file extension .txt. Writing in HTML and CSS or writing without formatting is best done in TXT files. In this post, we will walk you through multiple ways to create a text(TXT) file on Mac, including the macOS built-in tools and third-party apps.

How to create TXT files on Mac Difficulty levelRecommendations
Create TXT files using iBoysoft MagicMenu Low- directly create a TXT file from the customized right-click menu          
Generate TXT files with TextEdit Low - need to open the TextEdit app and save the text file to a desired location     
Make TXT files via Terminal High - should be familiar with commands, incorrect operation could cause data loss    
Create TXT files with Automator High - complicated procedure, need to run Apple Script  

The best way to create a TXT file: iBoysoft MagicMenu

Among all the methods to create .txt files on Mac, I'd like to first recommend using iBoysoft MagicMenu, a right-click enhancer for Mac. This is the fastest and easiest way to create a text file on Mac from the right-click menu.

The Finder context menu provides an option to create a new folder by default, you can't directly create a new file from the right-click menu just as you do on Windows. However, third-party tools such as iBoysoft MagicMenu can customize and enhance the right-click context menu on Mac. Creating new files is one of its highlights. 

iBoysoft MagicMenu's New File function supports a lot of file types, including .txt, in addition, you can also add other templates to the file type list. Here's how to create a TXT file on Mac with iBoysoft MagicMenu:

Step 1. Download and Install iBoysoft MagicMenu on Mac.

Step 2. Right-click on Desktop or with Finder's folder, and choose New File > TXT. It will create a new text file on the current location.

create txt file with magicmenu

Step 3. Double-click the .txt file to open it and continue editing.

Is it pretty simple to create a text file with iBoysoft MagicMenu? This versatile right-click tool also enables you to quickly access certain folders/files/websites on Mac, move items to a target location, convert image formats, find duplicate photos on Mac, etc, just download it to try and share it!

 

How to create a text file on Mac with TextEdit

 For Mac users, TextEdit is a free word-processing app. It is simple to use and comes pre-installed on all Mac computers. It provides most of the main functions you'll need and is easy enough for beginners to use right away. Follow the steps below to create a text file on Mac with TextEdit:

  1. Find TextEdit from Dock, Launchpad, or Finder > Applications > Utilities.
  2. Double-click TextEdit to open it. 
  3. On the pop-up windows, click the New Documents button.
  4. The default format is rich text, you should click Format and choose Make Plain Text. make plain text 
    Or, click TextEdit and choose Settings, select the New Document tab, and tick Plain tex under Format to set it as the default format.set plain text for new documents
  5. To save the .txt file, click File > Save. Name the document and save a location, then click Save.

How to create a text file on Mac via Terminal

Alternatively, through the command-line interface - Terminal, you can create a new file on Mac at any location. You should be careful when running Terminal commands when following the steps here:

  1. Launch Terminal from Finder > Applications > Utilities.
  2. Type the command below to head to the directory where you want to create a .txt file from Terminal: cd ~/directory For example, enter the command below to navigate to Desktop: cd ~/desktop Or, you can type "cd" and leave a space, then drag-drop the target folder to the Terminal window to create a .txt file in a folder on Mac.
  3. Then, enter the following command to create a text file, replace the file_name with your file name: touch file_name.txt

create new txt file terminal

How to create a text file on Mac using Automator

There is another macOS pre-installed application that can generate .txt files on your Mac - Automator. You can create a quick action in Automator, the quick action will be added to Finder, Touch Bar, and the Services menu, and is available from the context menu. The procedure is a little complicated, let's dive into it now.

  1. Open the Automator app on your Mac, and choose to create a new Quick Action.
  2. Use the Search box to search for AppleScript and drag-drop the Run AppleScript action into the workflow on the right side.use automator to create a txt file on mac
  3.  Add the following AppleScript text: tell application "Finder" to make new file at (the target of the front window) as alias
  4. Save the Quick Action with a name such as Create New Text File
  5. Head to the Finder, navigate to a folder or directory where you want to create the new TXT file in, and click Finder >  Services, then choose Create New Text File.create txt files with automator

If you have created .txt files on Mac with the methods above, share this post to help others!

 

Bonus tip: how to open a .txt file on Mac

If you get a TXT file on Mac, you may want to know how to open a text file on Mac, there are multiple ways you can choose from:

  • Method 1. Double-click the .txt file, it will be automatically opened in TextEdit.
  • Method 2. Right-click the text file, and choose Open With > TextEdit.
  • Method 3. Launch TextEdit, on the prompt window, choose the target TXT file and click Open, or from the toolbar of TextEdit, click File > Open.
  • Method 4. If you have installed iBoysoft MagicMenu, you can right-click the text file, and choose Launch With > TextEdit. If it is a frequently used TXT file, you can add it to the iBoysoft MagicMenu's Quick Access, so that you can open it directly from the right-click menu.

quick access

Conclusion

After reading this post, you learn 4 ways to create text(TXT) files on Mac, three of them use macOS built-in applications. If you want to create a text file on Mac quickly and easily, using third-party software iBoysoft MagicMenu is the best solution, it saves time and effort!