How to Open a .txt File on Mac (Every Method)
Opening a .txt file on Mac should be simple, but if you have multiple text editors installed, double-clicking doesn't always open the one you want. Here's every method available, from the quickest double-click to opening from Terminal.
Method 1 — Double-click (uses your default app)
The simplest way. Find the file in Finder and double-click it. macOS opens it in whatever application is set as default for .txt files. Out of the box that's TextEdit, but if you've changed your default it'll open in that instead.
Method 2 — Right-click → Open With
Right-click (or Control+click) any .txt file in Finder. Choose Open With from the menu. You'll see a list of apps that can open the file. Click the one you want. This is a one-time override — it won't change your default app permanently.
If the app you want isn't in the list, click Other... at the bottom to browse your Applications folder.
Method 3 — Drag the file into an app
Open the application you want to use, then drag the .txt file from Finder directly into the app window or onto its Dock icon. Works with TextEdit, VS Code, BBEdit, and most other editors.
Method 4 — Open from inside the app
Open your text editor first. Then use File → Open (⌘O) to navigate to the file. This is the most reliable method when you already have a specific editor open and want to add a file to it.
Method 5 — Terminal
open ~/Desktop/notes.txtThe open command in Terminal opens the file with your default app. To specify a different app:
open -a TextEdit ~/Desktop/notes.txt
open -a "Visual Studio Code" ~/Desktop/notes.txtMethod 6 — Quick Look (read-only preview)
Select a .txt file in Finder and press the spacebar. Quick Look shows you the contents of the file without opening any app. You can read it, but you can't edit it from Quick Look. Press spacebar again to close.
What if the file won't open at all?
If macOS says it can't open the file, it's usually one of two things: either the file has an unusual extension that macOS doesn't recognize as text, or there's a permissions issue. Try right-clicking and choosing Open With → TextEdit. TextEdit will open almost any plain text file regardless of extension.
If you're on a network drive or received the file from someone else, check that you have read permissions. Right-click the file, Get Info, and look at the Sharing & Permissions section at the bottom.
For most people, double-click gets the job done. Right-click → Open With covers everything else. Terminal is there if you need to open files in bulk or as part of a script.