.txt
Documents · text/plain
Opens with
Text, tables and slides. Many have open standards so they can be read outside the program that made them.
| MIME type | text/plain |
|---|---|
| Category | Documents |
| Opens in a browser | Yes |
| Plain text | Yes |
| Registered type | Yes |
The same file, another name
These share a MIME type. Renaming between them usually just works.
How to read this
- An extension is a label, not the contents. Rename a file to .png and if the bytes inside are JPEG, it is still a JPEG.
- A MIME type is how the internet names a file kind. Browsers look at that value, not the extension, to decide whether to display or download.
- A MIME type starting with x- was never registered as a standard. Plenty are in wide use, but they are not official names.
- Video extensions name a container. The same .mp4 may play on one device and not another, depending on the codec inside.
Frequently asked questions
Q. What is a .txt file?
It belongs to the documents category and its MIME type is text/plain. The contents are plain text, so you can even open it in Notepad and read it.
Q. What opens a .txt file?
Notepad, TextEdit, VS Code all handle it. In a browser it opens directly, with no extra software.
Q. What is the MIME type of .txt?
text/plain. The first half, text, names the broad kind; the second half, plain, names the exact format. It is a registered standard name.
Q. Is any other extension the same format as .txt?
.log, .ini share the very same MIME type. Renaming between them usually just works.
Q. My .txt file will not open.
First check that Notepad is installed. If it still fails, the download may have been cut short, or the file may only be named .txt while holding a different format inside.