What a text file is and how Windows handles it

A text file is a document that contains only plain text — no formatting, images, or special styling. Text files use the .txt extension and are one of the simplest file types your computer can read. Windows comes with built-in tools to open and edit them, and they work the same way across any device or operating system.

When you double-click a .txt file in Windows, it opens in Notepad by default — a basic text editor that comes with every Windows installation. You can also open text files with other programs, depending on what you want to do with the content inside.

Key Takeaways

  • Double-click any .txt file to open it in Notepad, the default text editor built into Windows.
  • You can create a new text file by right-clicking in a folder, selecting New, and choosing Text Document.
  • Edit text files in Notepad by typing or pasting content, then save your changes with Ctrl+S or File > Save.
  • Text files work with other programs too — you can open them in Word, VS Code, or any text editor depending on your needs.
  • Save important text files in a folder you can find later, and use clear names so you remember what each file contains.

Opening a text file in Windows

The easiest way to open a text file is to find it in File Explorer and double-click it. Windows will open it in Notepad automatically. If you have a text file on your desktop, in your Documents folder, or anywhere else on your computer, this method works the same way.

If double-clicking does not work, or if you want to open the file with a different program, right-click the .txt file and select "Open with". A menu will appear showing programs installed on your computer — Notepad is usually listed first. You can also select "Choose another app" to see more options like Word, VS Code, or other text editors you may have installed.

Creating a new text file

To create a new text file, open File Explorer and navigate to the folder where you want to save it. Right-click in the empty space of that folder, hover over "New", and select "Text Document". Windows will create a file called "New Text Document.txt" with the name highlighted so you can type a new name right away.

Give your file a descriptive name — something like "grocery-list.txt" or "notes-for-meeting.txt" — so you remember what it contains. Press Enter when you are done typing the name. The file is now created and ready to open. Double-click it to start editing.

Editing and saving text in Notepad

Once you have a text file open in Notepad, you can type or paste content directly into it. Notepad has no formatting options — you cannot make text bold, change colors, or adjust fonts. Everything you type will be plain text, which is exactly what .txt files are designed for.

To save your changes, press Ctrl+S on your keyboard, or go to File > Save at the top of the Notepad window. If you created a new file and have not saved it yet, a dialog box will ask you where to save it and what to name it. Choose a folder and type a name, then click Save. After that, Ctrl+S will save any new changes you make without showing the dialog again.

If you want to save your work as a different file — keeping the original unchanged — use File > Save As instead. This lets you choose a new name or location for the copy.

Opening text files with other programs

Text files are not locked to Notepad. You can open them in Microsoft Word, Google Docs, VS Code, or almost any text editor. Each program handles plain text the same way, but some offer extra features like syntax highlighting for code or better search tools.

To open a text file in a specific program, right-click the file and select "Open with", then choose the program you want. If the program you want is not listed, select "Choose another app" and browse for it. You can also set a different default program — right-click the file, select "Open with" > "Choose another app", pick your program, and check the box that says "Always use this app to open .txt files".

Common uses for text files in Windows

Text files are useful for storing notes, lists, code snippets, and configuration settings. Many programs use .txt files to store data or settings that users can edit manually. If you write code, text files are where you save your scripts and programs before compiling or running them.

You might also receive .txt files from other people — instructions, logs, data exports, or simple documents. Since text files have no formatting, they are lightweight, load instantly, and work on any device. They are also easy to search through and share without worrying about compatibility.

Organizing and finding your text files

Keep your text files in organized folders so you can find them later. Create a folder called "Text Files" or "Notes" in your Documents folder, or organize them by topic — "Work", "Personal", "Code", and so on. Use clear, descriptive file names that tell you what each file contains at a glance.

If you forget where you saved a text file, use the search box in File Explorer. Press Ctrl+F or click the search icon in the top right, type the file name or part of it, and Windows will show you where it is. You can also search for files by the date you created or modified them if you remember roughly when you saved it.

Frequently Asked Questions

Can I edit a text file in Microsoft Word?

Yes. Right-click the .txt file, select "Open with", and choose Word. Word will open the text file, and you can edit it normally. When you save, Word will ask whether to keep it as a .txt file or convert it to a Word document (.docx). Choose .txt if you want to keep it as plain text.

What is the difference between .txt and .docx files?

.txt files contain only plain text with no formatting, images, or special styling. .docx files (Word documents) can include fonts, colors, bold text, images, and complex layouts. Text files are simpler and smaller, while Word documents are better for formatted documents like resumes or reports.

Can I open a text file on my phone or tablet?

Yes. Text files work on phones, tablets, and any device with a text editor. On Android, use an app like Google Drive or a text editor app. On iPhone or iPad, use Notes, iCloud Drive, or a text editor from the App Store. You can also email the .txt file to yourself and open it on any device.

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

Notepad is the default program Windows uses to open .txt files. If you prefer a different program, right-click a .txt file, select "Open with" > "Choose another app", pick your preferred program, and check "Always use this app to open .txt files". From then on, that program will open .txt files by default.

Can I convert a text file to a PDF or Word document?

Yes. Open the .txt file in Word or another program, then use File > Save As and choose a different file format — .docx for Word, .pdf for PDF, or others. The content will be converted to the new format. Some online tools also convert file formats if you prefer not to install software.