How to create a text txt file on Mac

How to create a text txt file on Mac

Bought a new Mac and trying to figure out how to use it? Check out How to create a text txt file on Mac in this article.

One of the advantages of Windows over Mac is its user-friendly operating system. For example, in Windows, you can simply create a new text file from the context menu that displays when you right-click anywhere on the screen.

This feature, however, was lacking from the start with Mac. However, this does not preclude you from creating or saving a new text file on a Mac.

Yes, it requires more steps than Windows, but Mac offers a variety of unique options for editing text files that Windows does not.

How to create a text txt file on Mac

So, let's take a look at how to make, format, and save a new text file in any folder on a Mac.

What is a Text (.TXT) File?

A 'text' or '.txt' file is made up of unformatted plain text with no images or special fonts. The '.txt' refers to the file extension, and 'unformatted' indicates that the text file contains no styling or new typefaces. Almost every computer operating system includes tools that allow you to create a new text file.

On a Mac, you can primarily use TextEdit, a text editor, to create, format, save, and locate a .txt file. The good news is that you don't have to download it from the App Store; it comes standard with macOS.

If you're looking for another way to produce a text file, Mac provides two options: Automator and Terminal.

Character Encodings in the Text Files

Although a text file appears to be the most basic type of file you may create and open on your device, it is much more than that.

Every text file is distinct from the others. Furthermore, almost all of the files have competing character encodings, which demonstrate how different symbols, alphabets, letters, and emojis are converted into computer language.

Computers perform this translation to store data efficiently.

Furthermore, computers use a variety of encodings, which differ depending on the language of the country. However, if you are an American, you will largely use the ASCII and Unicode systems.

Furthermore, every operating system and text processing programme uses a variety of methods to read and display a text's final line.

As a result, if a file is transferred and received several times between various operating systems, such as from Microsoft Windows to Linux or from Apple macOS to Windows, there is a potential that it will be damaged or corrupted.

What is TextEdit?

TextEdit is a function that comes standard with all Mac models and versions of OS X and macOS. It is useful when you need to create and edit a new text file.

However, everyone is familiar with TextEdit in this capacity. What if we told you that you could use one programme to convert text files from one format to another, generate a new HTML document, and write on images? Doesn't that seem intriguing?

Here's a list of everything TextEdit can do for you:

  1. Open, Edit, and Save Your Text Documents in Different Formats
    TextEdit lets you open and edits rich text files written in other programmes, such as Microsoft Word. You may also change the format of your files to make them compatible with different operating systems or programmes.
  2. Write and Edit HTML Codes into Documents
    TextEdit allows you to effortlessly generate and edit HTML code in a text file. Later, you can open and examine these HTML documents in a browser, or you can use TextEdit as an HTML code editor.

You can accomplish so by doing the following:

Create an HTML document.

  • Navigate to the TextEdit app.
  • Then, go to File > New > Format > Make Plain Text.
  • Insert the HTML code now.
  • Choose File > Save once more.
  • Save the file with a name that includes the '.html' extension.
  • When asked about the extension, select 'Use.html.'

Open an HTML Document

  • Open the TextEdit app.
  • Choose File > Open from the menu. Select the document that you want to see.
  • Now, at the bottom of the TextEdit dialogue screen, click Options.
  • 'Ignore rich text commands' should be selected.
  • Now open the file.
  1. Write on the Photos
    You can even write or draw on the images in your text files. Not only that, but you can rotate, crop, and add symbols, letters, shapes, and signatures to them using a variety of tools in the TextEdit app's Markup toolbar.

Do the following:

  • Launch the TextEdit app.
  • Place the cursor over the image and select the Markup option from the pop-up menu.
  • Now, select Markup and write or draw anything you want using the tools in the toolbar. You may, of course, utilise the Touch Bar as well.
  • Click the Done button.

How to Create a New Text File Using TextEdit?

Almost all Mac computers include programmes that allow users to produce various types of documents for free. These tools, for example, allow you to produce spreadsheets, yearly reports, presentations, text documents, and much more.

If you want to create a text document, you can do so quickly and easily with the TextEdit app.

Here's how to do it:

  • On your Mac, launch the TextEdit software.
  • From the Open dialogue, choose 'New Document,' or click 'Choose File,' then 'New.'
  • In TextEdit, you have two format options: plain text (.txt files) and rich text (.rtf files) (.rtf file). The distinction between the two is that plain text lacks formatting, but rich text allows you to format different pictures and tables in your file.
  • The default format is rich text, but you can use any format you like.

Pages, Numbers, and Keynote are all Mac apps that may be used to create a plain text file.

If you can't find any of the apps on your Mac, you can download them from the App Store. They are compatible with all iOS and iPadOS devices.

Some Other Text Editors

Fortunately, current versions of macOS provide at least two built-in command-line text editors, Vim and Emacs.

If you're new to using these tools, you may encounter some challenges. However, because these technologies are mostly used by skilled programmers and IT officials, you can learn them with great emphasis. The good news is that they are both free.

Furthermore, if you want to acquire text editing software with up-to-date capabilities, you may easily find them on your Mac. Atom and Sublime Text are the most commonly used tools.

If you didn't previously know, Microsoft Word's widely used word processing tool includes modified text editing features.

How to Create a Text File on a Mac Using Automator?
To use the Automator to produce a new text file, you must first construct an app. After that, you can create a new file in any folder you like.

What you must do is as follows:

  • Launch Automator.
  • Now, navigate to the 'Applications' folder.
  • Create a new app by selecting 'New Document.'
  • A screen will open in which you will be asked what type of document you want to create. Select Application > Choose after clicking on it.
  • Then, from the Actions menu, drag the "Run AppleScript" action and drop it into the workflow panel on the right side.
  • You can now enter an AppleScript into the workflow panel. To do so, copy the script below and paste it into the AppleScript box on the workflow panel.
  • "Instruct the application "Finder" to create a new file as an alias at (the target of the front window)."
  • Choose the File menu at the top and then click 'Save.'
  • The following window will prompt you to input the name of your programme as well as the place where you wish to save it.
  • You can enter whatever name you choose, but the file will be saved in the 'Applications' folder.
  • In addition, change the File Format to 'Application.' It's accessible via the drop-down menu.
  • Click the 'Save' button.
  • Now, using the Finder, navigate to the 'Applications' folder. Drag and drag the previously generated programme into the toolbar.
  • When the application reaches the Finder's toolbar, you may create a new text file in any folder on your Mac with a single click.
  • To do so, open a folder and then click the app icon you just added to the toolbar. A plain text file with the name 'untitled' will be created immediately there.
  • Finally, double-clicking on the new file will allow you to open it. Again, use whatever editor you want, change the file as you see fit, and add as many words as you like.

This is the quickest and easiest way to create a new text file in any folder on a Mac.

How to Create a New Text File on a Mac Using Terminal?

If you choose the Terminal technique instead of the Automator way, you will have to take some extra steps.

Here's how to use Terminal to create a new text file on your Mac:

  • First, in the Finder, navigate to the folder where you wish to save the text file.
  • Now, in the Finder, go to the top menu and select 'Services,' then select the 'New Terminal at Folder' option.
  • In the current working directory, a Terminal window will be opened.
  • Please copy the script below, paste it into the Terminal, and press Enter.
  • "touch MyFile.txt"
  • You can also alter the file's name to whatever you wish. Simply change the name to 'MyFile' and save it.
  • This will immediately create a text file in the folder you specify.


So you've learned three simple ways to create a text file anywhere on your Mac. Simply follow the step-by-step method that works best for you and work on your content without interruption.

However, keep in mind that you must copy and paste the identical command script, or else the approaches will not work.

You can now create, open, and edit any text file on your Mac in the same way that you do on Windows.

Reading next

How to set up and use Dual SIM
Best AirPods Pro Tips and Tricks

Leave a comment

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.