How to Create a TXT File on Mac: Every Method Explained

Plain text files are one of the most portable, lightweight formats in computing. No formatting baggage, no compatibility issues — just clean, readable content that works everywhere. Whether you're writing scripts, storing notes, or preparing data for a developer workflow, knowing how to create a .txt file on your Mac is a genuinely useful skill. The good news: there are several ways to do it, and the right method depends entirely on how you work.

What Is a TXT File, Exactly?

A .txt file is a plain text document — it contains only raw characters with no embedded formatting, fonts, or metadata. Unlike a .docx or .pages file, what you see is literally what's stored. This makes TXT files universally readable by virtually any application on any operating system.

On a Mac, the challenge isn't creating the file — it's knowing which tool gives you a true .txt output rather than a rich-text format dressed up with the wrong extension.

Method 1: Using TextEdit (Built-In, But With a Catch)

TextEdit is macOS's default text editor, and it can create TXT files — but only if you configure it correctly first.

The catch: TextEdit defaults to Rich Text Format (RTF), not plain text. If you save without switching modes, your file will technically be RTF even if it looks like plain text on screen.

How to create a plain TXT file in TextEdit:

  1. Open TextEdit (find it in Applications or via Spotlight with Cmd + Space)
  2. Go to Format in the menu bar
  3. Select Make Plain Text (or use the shortcut Shift + Cmd + T)
  4. Type your content
  5. Go to File > Save (Cmd + S)
  6. Name your file and ensure the extension is .txt
  7. Uncheck "If no extension is provided, use '.txt'" only if you've already typed the extension manually

If you want TextEdit to always open in plain text mode, go to TextEdit > Preferences > New Document and select Plain Text under Format. This saves you the manual switch every time.

Method 2: Using Terminal (Fast and Precise) 🖥️

If you're comfortable with the command line, Terminal gives you instant, guaranteed plain text files with no format ambiguity.

Create an empty TXT file:

touch ~/Desktop/myfile.txt 

Create a TXT file with content:

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

Open a TXT file in a text editor from Terminal:

open -e ~/Desktop/myfile.txt 

The touch command creates an empty file at the specified path. The echo command writes a string directly into the file. Terminal never adds formatting — what you type is exactly what gets stored.

This method is particularly useful if you're creating multiple files, automating file creation with scripts, or working within a development environment.

Method 3: Third-Party Text Editors

Several free and paid text editors on Mac are purpose-built for plain text and developer workflows. These eliminate the RTF confusion entirely.

EditorBest ForPlain Text Default
Visual Studio CodeDevelopers, scripting✅ Yes
BBEditWriters, coders, power users✅ Yes
Sublime TextSpeed, large files✅ Yes
CotEditorSimple, lightweight use✅ Yes

All of these save as plain text by default and give you explicit control over file extensions. If you're already using one of these editors in your workflow, creating a TXT file is as simple as File > New, typing your content, and saving with a .txt extension.

Method 4: Using the Finder (Quick Empty File Trick)

Finder doesn't have a native "New Text File" option the way Windows Explorer does — but you can work around this.

One approach: drag a file saved from TextEdit or Terminal into Finder and rename it as needed. Another option is creating a simple Automator Quick Action or Finder Extension that adds a "New Text File" right-click option to Finder — a one-time setup that many Mac users find worth the effort.

Some third-party apps available through the Mac App Store also add this functionality directly to Finder's context menu.

Verifying Your File Is Actually Plain Text

After creating your file, it's worth confirming the format is correct — especially if you used TextEdit.

  • Right-click the file in Finder and select Get Info
  • Check the Kind field: it should say Plain Text Document, not Rich Text Document
  • Alternatively, open Terminal and run: file ~/Desktop/myfile.txt — it should return ASCII text or UTF-8 Unicode text

If it returns Rich Text Format, the file wasn't saved as plain text, and you'll need to repeat the process with the plain text mode active. 📄

The Variables That Affect Which Method Works Best

Not every approach suits every user equally. A few factors shape which method makes sense:

  • Technical comfort level — Terminal is fast and reliable, but assumes familiarity with command-line syntax. TextEdit is more accessible but requires knowing about the RTF default.
  • Frequency of use — If you're creating TXT files regularly, setting TextEdit to plain text mode permanently or using a dedicated text editor removes repeated friction.
  • Workflow context — Developers working in VS Code or a similar environment will naturally create TXT files there. Writers or note-takers may prefer a lighter-weight tool.
  • macOS version — The TextEdit interface and preferences layout have shifted slightly across macOS versions (Ventura, Sonoma, and beyond), so exact menu locations may vary slightly on your machine.
  • Encoding requirements — Plain text files can be saved in different encodings (UTF-8, ASCII, UTF-16). Most use cases don't require thinking about this, but if your TXT file will be processed by specific software or scripts, encoding may matter.

The "best" method isn't universal — it's the one that fits your current tools, habits, and the downstream use of the file you're creating.