The fastest way to create a text file
The simplest method depends on your operating system. On Windows, right-click an empty area of your desktop or folder, select New, then Text Document. On Mac, open Finder, go to File > New Finder Window, navigate to where you want the file, then open TextEdit from Applications > Utilities, set the format to plain text under Format menu, and save it. On Linux, right-click in a file manager window and select Create Document or New File, depending on your desktop environment — or open a terminal and type touch filename.txt.
Each method creates an empty file ready for text. The file will have a .txt extension, which tells your computer it contains plain text with no formatting. You can then open it with any text editor to add content.
Key Takeaways
- Windows users can right-click and select New > Text Document to create a file instantly on the desktop or in any folder.
- Mac users need to open TextEdit, change the format to plain text, and save the file with a .txt extension to avoid formatting issues.
- Linux users can right-click in a file manager or use the terminal command touch filename.txt to create a file.
- Text files created this way open in any text editor and contain no formatting, making them compatible across all devices and programs.
Creating a text file on Windows
On Windows 10 and 11, the quickest route is the right-click menu. Navigate to the folder or desktop where you want the file. Right-click an empty area, hover over New, and select Text Document. Windows will create a file named "New Text Document.txt" with the name highlighted so you can type a new name immediately.
If you do not see the New option, your system may have a different configuration. In that case, open Notepad directly: press Windows key + R, type notepad, and press Enter. A blank Notepad window opens. Type or paste your content, then go to File > Save As, choose your location, enter a filename with the .txt extension, and click Save.
Creating a text file on Mac
Mac does not have a right-click "New Text Document" option like Windows. Instead, open TextEdit, which comes built into every Mac. Press Command + Space to open Spotlight, type "TextEdit", and press Enter. TextEdit opens with a blank document.
Before you type anything, change the format to plain text. Go to the Format menu at the top and select Plain Text. If you skip this step, TextEdit will save the file with rich formatting that can cause problems when you open it elsewhere. After setting the format, type your content. Go to File > Save, enter a filename with the .txt extension, choose where to save it, and click Save.
Creating a text file on Linux
Linux offers several routes depending on your desktop environment. In most file managers (like Nautilus on GNOME or Dolphin on KDE), right-click an empty area of a folder window and look for Create Document, New File, or New Empty File. Select it, type a filename with the .txt extension, and press Enter.
If you prefer the terminal, open it and navigate to the folder where you want the file. Type touch filename.txt and press Enter. The file is created instantly. You can then open it with any text editor — type nano filename.txt to edit it in the terminal, or gedit filename.txt to open it in a graphical editor, depending on what is installed on your system.
Naming your text file correctly
A text file must end with the .txt extension so your computer recognizes it as plain text. If you name a file "myfile" without the extension, your system may not open it with a text editor by default. Always include the .txt at the end: "myfile.txt", "notes.txt", "data.txt".
Avoid special characters in filenames like asterisks (*), question marks (?), forward slashes (/), and colons (:). These can cause errors on some systems. Stick to letters, numbers, hyphens, and underscores. Spaces are fine but can make filenames harder to work with in the terminal, so many people use hyphens or underscores instead: "my-notes.txt" or "my_notes.txt".
Text editors you can use to open and edit files
Once you create a text file, you can open it with any text editor. On Windows, Notepad is built in and works for basic editing. For more features, Notepad++ is free and widely used. On Mac, TextEdit works, but many people prefer free options like Visual Studio Code or Sublime Text. On Linux, nano and vi are available in the terminal, while gedit, Kate, or Visual Studio Code work in the graphical interface.
All these editors save files as plain text, so the file remains compatible no matter which one you use. The .txt extension stays the same, and you can open the file on any device — Windows, Mac, Linux, or even a phone — without conversion or compatibility issues.
Frequently Asked Questions
What is the difference between a text file and a Word document?
A text file (.txt) contains only plain text with no formatting — no bold, italics, colors, or fonts. A Word document (.docx) stores formatted text along with styling information. Text files are smaller, simpler, and open on any device. Word documents require Microsoft Word or a compatible program and can be more complex.
Can I create a text file without using the right-click menu?
Yes. Open any text editor (Notepad on Windows, TextEdit on Mac, nano or gedit on Linux), create your content, and save it with a .txt extension. You can also use the terminal on any system: on Windows with PowerShell, Mac, or Linux, type echo. > filename.txt (Windows) or touch filename.txt (Mac and Linux).
Why does my text file open in the wrong program?
Your system has a default program set for .txt files. To change it, right-click the file, select Open With (Windows) or Get Info (Mac), and choose a different text editor. Select Change All or Always Open With to make that editor the default for all text files going forward.
Can I create a text file on my phone?
Yes. On iPhone, use the Notes app or download a text editor like iA Writer or Notepad. On Android, use Google Keep, Notepad, or any text editor from the Play Store. These create files you can save and share, though the process differs slightly from desktop systems.