TEXT (Plain Text)
The universal lingua franca of computing: every device on earth can read a plain text file.
| Full name | Plain Text |
| Extension | .txt |
| MIME type | text/plain |
| Developer | No single creator; standardized by the IETF (RFC 2046, 1996) |
| Released | 1963 (ASCII basis); MIME type standardized November 1996 |
| Type | Document |
| Character encoding | ASCII, UTF-8, UTF-16, or other text encodings |
| Line endings | LF (Unix/macOS), CRLF (Windows), CR (classic Mac OS) |
What is a TXT file?
A plain text file stores human-readable characters with no embedded formatting commands. Any text editor, terminal, or programming language can open one without special software. The .txt extension and text/plain MIME type are two of the oldest conventions still in daily use.
Plain text is a sequence of characters drawn from a character encoding such as ASCII or UTF-8, stored byte by byte with no markup, fonts, colors, or layout instructions. What you see in the file is exactly what the data contains. The only structural element is whitespace: spaces, tabs, and line-ending characters that separate lines. This simplicity is also why the format survives unchanged across decades of computing.
History
The foundation of plain text is ASCII, first published as an American national standard in 1963 to give all computers a common 128-character alphabet. The .txt extension became widespread through CP/M and MS-DOS in the late 1970s and 1980s as the default label for human-readable files. The IETF formally standardized the text/plain MIME type in November 1996 via RFC 2046, written by Ned Freed and Nathaniel Borenstein, cementing its role on the web and in email.
How it works
A plain text file is a flat sequence of bytes where each byte (or multi-byte sequence in UTF-8/UTF-16) maps to one character. Lines are separated by a newline character: LF (0x0A) on Unix and macOS, CRLF (0x0D 0x0A) on Windows. There is no header, no metadata block, and no length prefix. The file ends when the bytes run out, sometimes with a trailing newline.
What it is used for
- Writing and sharing source code, scripts, and configuration files
- Storing log output, error messages, and diagnostic reports
- Exchanging human-readable data between applications without version lock-in
- Drafting notes, README files, and documentation that must stay readable forever
How to open it
Any text editor opens a .txt file: Notepad on Windows, TextEdit on macOS, gedit or nano on Linux, and code editors such as VS Code or Sublime Text. Browsers also render plain text directly when you drag a file into the address bar.
Pros and cons
Strengths
- Universally compatible: every operating system and programming language can read it
- Tiny file size: no overhead from formatting metadata or binary structures
- Human-readable without any software: you can inspect it in a terminal with a single command
- Future-proof: files written in 1970 are still readable today with zero conversion
Trade-offs
- No formatting: bold, italic, tables, and images are not possible in the file itself
- Line ending differences between Windows (CRLF) and Unix (LF) can cause display problems
- No built-in encoding declaration: the reader must guess or be told which character set was used
- Not suitable for binary data: storing non-text content corrupts the file
Convert TXT files
Free, in your browser, no signup. Start at the TXT converter, or jump straight to a popular conversion below.
Curious how fast and how small? See our measured conversion benchmarks.
TXT FAQ
What is the difference between a .txt file and a .doc or .docx file?
A .txt file contains only characters with no formatting. A .doc or .docx file wraps the text inside a binary or ZIP-based container that stores fonts, styles, images, and layout. Opening a .docx in a plain text editor shows mostly unreadable binary data.
Why does a plain text file sometimes look broken when opened on a different operating system?
Windows uses CRLF (two characters) to end each line, while Unix and macOS use only LF (one character). An editor that does not handle both styles will show the extra carriage-return character as a symbol or run all lines together.
What character encoding should I use when saving a .txt file?
UTF-8 is the safe default for new files. It covers every Unicode character, is backward-compatible with ASCII for the first 128 characters, and is understood by virtually all modern software.
Can a .txt file contain emojis or non-Latin characters?
Yes, if the file is saved in UTF-8 or another Unicode encoding. Plain text format places no restriction on which characters appear; the limit is only what the chosen encoding can represent.