The fastest way to create a text file

A text file is a document that contains only letters, numbers, and symbols — no formatting, no images, no special styling. You create one by opening a text editor (a program designed to write plain text), typing what you need, and saving it with a .txt extension.

On Windows, right-click on your desktop or inside a folder, select New, then Text Document. Name it and press Enter. On Mac, open TextEdit (in Applications > Utilities), go to Format menu and choose Make Plain Text, then type and save. On Linux, right-click in a file manager and select Create Document or New File, or open a terminal and type touch filename.txt.

Key Takeaways

  • Windows users can right-click on the desktop or in a folder and select New > Text Document to create a file when ready.
  • Mac users must open TextEdit, switch to plain text mode in the Format menu, and then save the file with a .txt extension.
  • Text files work on every device and operating system, making them the most reliable format for storing information you want to keep readable forever.
  • Saving with a .txt extension tells your computer the file contains only plain text, not formatted content.

Creating a text file on Windows

Windows gives you the quickest route: right-click on your desktop or inside any folder, and a menu appears. Hover over New and a submenu shows options including Text Document. Click it, and Windows creates a file called New Text Document.txt with the name highlighted so you can type a new one when ready.

Type the name you want — for example, grocery_list or notes_from_meeting — and press Enter. Windows automatically adds the .txt extension. The file opens in Notepad (the built-in text editor) and you can start typing right away. When you finish, press Ctrl+S or go to File > Save to lock in your changes.

If you already have Notepad open, you can also create a new file by pressing Ctrl+N, typing your content, and then saving it with a filename and .txt extension.

Creating a text file on Mac

Mac's default text editor is TextEdit, which you find in Applications > Utilities. Open it and you see a blank page, but TextEdit is set to create formatted documents by default (like a word processor). You must change this before typing anything.

Go to the Format menu at the top and select Make Plain Text. The page appearance changes slightly — you lose font options and styling buttons. Now type your content. When you finish, press Cmd+S (or go to File > Save). A dialog box appears asking for a filename. Type your name, make sure the file format shows Plain Text, and click Save. Mac adds the .txt extension automatically.

If you forget to switch to plain text mode before saving, TextEdit saves as .rtf (rich text format) instead, which adds invisible formatting codes. You can always open the file, switch to plain text mode, and save again to fix it.

Creating a text file on Linux

Linux offers several routes depending on which desktop environment you use. In most file managers (like Nautilus on Ubuntu or Dolphin on Fedora), right-click in an empty area of a folder and look for Create Document or New File. Select it, name your file with a .txt extension, and press Enter. The file appears in the folder ready to open.

From the terminal, the fastest method is to type touch filename.txt and press Enter. This creates an empty file when ready. You can then open it with any text editor — nano, vi, or gedit — by typing the editor name followed by the filename, for example nano filename.txt.

Many Linux users prefer terminal-based editors because they work over remote connections and require no graphical interface. If you are new to Linux, using the file manager's right-click menu is simpler and produces the same result.

Why use .txt and not another format

A .txt file is universal — every device, every operating system, and every program that reads text can open it without special software. A file you create today will open the same way in 20 years on hardware that does not exist yet. Other formats like .docx (Microsoft Word) or .pages (Apple) require specific programs and can become unreadable if those programs change or disappear.

Text files are also tiny. A document with 10,000 words takes up roughly 50 kilobytes as a .txt file but 500 kilobytes or more as a .docx file, because Word stores invisible formatting, fonts, and metadata. For storing notes, lists, code, or any information you want to keep readable and portable, .txt is the safest choice.

If you need formatting — bold text, different fonts, colors — you are no longer creating a text file. You are creating a formatted document, which requires a different editor and a different file format. Stick with .txt when you want plain text only.

Opening and editing a text file you already created

Double-click the .txt file and it opens in your default text editor. On Windows, that is usually Notepad. On Mac, it is TextEdit. On Linux, it depends on your settings but is often gedit or another graphical editor. Make your changes, save with Ctrl+S (Windows and Linux) or Cmd+S (Mac), and you are done.

You can also right-click the file and select Open With to choose a different editor. This is useful if you want to use a more powerful editor like Visual Studio Code, Sublime Text, or Notepad++ for larger files or if you are writing code. The file itself does not change — only the program that opens it changes.

Common mistakes when creating text files

The most common mistake is forgetting to save. You type content, close the window, and the text disappears because you never pressed Save. Always save before closing, or set your editor to auto-save if it offers that option.

Another mistake is saving without a .txt extension. If you type a filename like notes instead of notes.txt, your computer may not recognize it as a text file and may try to open it with the wrong program. Always include the .txt at the end.

On Mac, the most common mistake is forgetting to switch to plain text mode before saving. If you save from the default formatted mode, you get a .rtf file instead of .txt. Check the Format menu before you save for the first time.

Frequently Asked Questions

Can I create a text file without opening an editor?

Yes. On Windows, right-click and select New > Text Document. On Mac, you can use the terminal command touch filename.txt. On Linux, the same terminal command works, or use your file manager's right-click menu. All three methods create an empty .txt file when ready without opening an editor first.

What is the difference between .txt and .doc or .docx?

.txt contains only plain text with no formatting. .doc and .docx are Microsoft Word formats that store fonts, colors, bold, italics, images, and other styling. A .txt file opens the same way on any device. A .docx file requires Word or compatible software and may look different on different computers.

Can I rename a file to change it from .docx to .txt?

You can rename the file, but that does not convert it. A .docx file renamed to .txt will still contain Word formatting codes that make it unreadable as plain text. To truly convert it, open the .docx file in Word, go to File > Save As, and choose Plain Text (.txt) as the format.

Why does my text file open in Notepad instead of another editor?

Notepad is set as your default text editor. You can change this by right-clicking a .txt file, selecting Open With, choosing a different editor, and checking the box that says "Always use this app". After that, all .txt files open in your chosen editor.

Is it safe to delete a .txt file?

Yes, deleting a .txt file is safe and does not affect your system. It straightforward removes the file from your computer. If you delete it by accident, check your Recycle Bin (Windows) or Trash (Mac and Linux) — you can usually restore it from there if you act quickly.