A .txt file is a plain text document: just characters, with no fonts, colors, images, or formatting layered on top. It's the simplest file format that exists, which is exactly why it opens on any computer, phone, or code editor without special software.
What ".txt" actually means
The letters stand for "text," and the extension tells your device which program should open the file by default: Notepad on Windows, TextEdit on Mac, or whatever plain text editor you have installed.
Inside the file itself, there's nothing but characters saved in a text encoding like UTF-8 or ASCII. No hidden formatting codes, no embedded images, no macros, no metadata about who wrote it or when. Just the letters, numbers, and symbols you typed.
What's inside a .txt file (and what a Word doc adds)
A .docx file also stores your words, but it wraps them in a layer of formatting instructions: font, size, color, spacing, page margins, sometimes embedded images. Open a .docx file in a plain text viewer and you'll mostly see code, not your document.
Open a .txt file the same way and you'll see exactly what you typed. That's the tradeoff: .docx gives you formatting, .txt gives you a file that any device, any program, and any person can read without translation.
When to use a .txt file instead of a Word doc
Reach for .txt when the content matters more than how it looks:
- Code and config files. Every programming language reads plain text. A .docx file would break the code with hidden formatting characters.
- Quick notes and README files. A .txt file opens instantly on any device, with no compatibility question.
- Anything you're copying and pasting elsewhere. Plain text carries none of the extra formatting that can tag along with a Word doc and clutter the destination.
Skip .txt when formatting matters: a resume, a printed handout, a document that needs track changes or comments. That's what .docx, .rtf, or a PDF are for.
How to open and create a .txt file
On Windows, open Notepad, type, and save. Notepad already defaults to the .txt extension.
On Mac, TextEdit defaults to Rich Text format, which saves as .rtf, not .txt. To save plain text, choose Format > Make Plain Text before saving, or go to TextEdit > Settings > New Document and set the default format to Plain Text.
On a phone, any notes app can export plain text, and most code editors, like VS Code, treat plain text as the default for new files.
The short version
A .txt file is plain, unformatted text that opens anywhere, on any device, with no compatibility questions. Use it for code, notes, and anything you want to move between programs cleanly. Reach for .docx or a PDF only once formatting actually matters.
Want more quick explainers like this one? Browse the rest of the blog, or if you've got a tech question you'd like answered, send it my way.