How to Make a .txt File on Mac: Every Method Explained

Plain text files are among the most useful and universally compatible files you can create. No formatting baggage, no proprietary software required — just raw text that opens anywhere. If you're on a Mac and need to create a .txt file, there are several ways to do it, and the best approach depends on how you work and what you plan to do with the file.

What Is a .txt File and Why Does It Matter?

A .txt file is a plain text document with no embedded formatting, fonts, or styling. Unlike a .docx or .pages file, it stores only the characters you type — nothing else. That makes it lightweight, portable, and readable by virtually every operating system and application on the planet.

Common uses include:

  • Writing scripts or code snippets
  • Storing notes, lists, or log data
  • Creating config files or README documents
  • Passing text between apps without formatting conflicts

The catch on Mac: Apple's default text editor, TextEdit, doesn't always save as plain .txt by default. Understanding that nuance is key to getting the file format right.

Method 1: Using TextEdit (The Built-In Way)

TextEdit comes pre-installed on every Mac. It can save files as either Rich Text Format (.rtf) or plain text (.txt) — but it defaults to Rich Text, which is where many users run into trouble.

Steps to Create a .txt File in TextEdit

  1. Open TextEdit (find it in Applications or via Spotlight with ⌘ + Space).
  2. Before typing anything, go to Format in the menu bar and select Make Plain Text (or press ⇧⌘T).
  3. Type your content.
  4. Go to File → Save (⌘S).
  5. In the save dialog, check the filename — it should end in .txt. If TextEdit adds no extension or appends .rtf, type the full filename manually including .txt.
  6. Click Save.

📝 If you want TextEdit to always default to plain text, go to TextEdit → Settings → New Document and select Plain text under the Format section. This saves you from switching modes every time.

Why This Step Is Easy to Miss

When TextEdit is in Rich Text mode, it saves as .rtf even if you manually type .txt as the filename — in some macOS versions, it will warn you or silently keep the .rtf format. Always confirm the format is set to Plain Text before saving.

Method 2: Using Terminal (The Fast Way for Technical Users)

If you're comfortable with the command line, Terminal is the quickest way to generate a .txt file — especially useful for developers or anyone creating multiple files.

Create an Empty .txt File

Open Terminal (Applications → Utilities → Terminal) and type:

touch ~/Desktop/myfile.txt 

This creates a blank .txt file named myfile.txt on your Desktop instantly.

Create a .txt File With Content

echo "Your text here" > ~/Desktop/myfile.txt 

Or open a file directly in a command-line editor:

nano ~/Desktop/myfile.txt 

Type your content, then press Control + X, then Y, then Enter to save.

Terminal bypasses any format confusion — what you name it is what it becomes. There's no risk of it silently saving as .rtf.

Method 3: Using a Third-Party Text Editor

Several free and paid text editors on Mac are designed specifically for plain text and developer workflows. These eliminate the format-switching friction of TextEdit entirely.

AppFree?Best For
VS CodeYesDevelopers, coders
BBEditFree tier availableWriters, web devs
Sublime TextFree (occasional prompt)Power users
Atom (archived)Was freeLegacy users
CotEditorYesJapanese text, plain writing

In any of these apps, simply open the application, create a new file, type your content, and save with a .txt extension. They all default to plain text — no mode switching required.

Method 4: Saving From Another App as .txt

Some workflows involve content that starts in another application — a word processor, notes app, or email client. In many Mac apps, you can export or save as plain text:

  • In Pages: File → Export To → Plain Text (.txt)
  • In Word for Mac: File → Save As → change the format dropdown to Plain Text (.txt)
  • In Notes: Notes doesn't export directly to .txt, but you can copy text and paste it into TextEdit in plain text mode

When saving from a rich-text environment, you'll often see a warning that formatting will be lost. That's expected — and exactly the point of .txt.

Verifying Your File Is Actually .txt

Mac hides file extensions by default. To confirm your file saved correctly:

  1. Right-click the file and select Get Info.
  2. Look at the Name & Extension field.
  3. The extension should read .txt — not .rtf, .pages, or anything else.

You can also enable extensions globally: Finder → Settings → Advanced → Show all filename extensions.

The Variables That Shape Which Method Works Best 🖥️

What makes one approach better than another comes down to a few factors:

  • Technical comfort level — Terminal is faster but requires command-line familiarity
  • Frequency of use — If you create .txt files often, changing TextEdit's default settings or using a dedicated editor saves ongoing friction
  • macOS version — TextEdit's behavior around extensions and format defaults has varied slightly across macOS releases; the current behavior on Sonoma and Ventura is consistent but worth verifying on your machine
  • Downstream use — A .txt file for a developer workflow (config files, scripts) has different requirements than one for simple note-taking

Someone creating occasional notes has a very different experience than a developer generating dozens of plain text files as part of a build process. The method that feels invisible and frictionless for one person may feel unnecessarily complex for another.

Your own workflow, how often you need plain text files, and how much control you want over the process are what ultimately determine which approach fits.