From ArticleWorld

.txt is the file name extension and the name of files encoded in a native, plain-text format, with few formatting options. The .txt file format contains nothing but text, and the only formatting option available usually refers to wrapping the lines after a certain number of lines.

The .txt format is virtually device-independent, since it can be read even on computers with little processing power. It should be noted, however, that plain text files do not need the .txt extension to be recognized. Some systems (especially Unix systems) treat them just like any other files. Therefore, it should be noted that the .txt format is simply a format that can store plain-text, not a synonym of plain-text.


Although there are no formal specifications for the .txt format, there are some common variants. ASCII encoding is normally used for writing text with Roman alphabet, while UTF-8 and UTF-16, Unicode-based encodings, are used for writing text in many other languages than English. IBM mainframes normally use EBCDIC encoding.

Windows, Mac, Unix

The main differences between the way these operating systems use the .txt format refers to the newline command. Microsoft DOS and Windows use a newline command or two characters: CR and LF (ASCII 13 and 10 respectively). The last line is usually not ended with a newline. They are usually based on ANSI encodings, but can use UTF-8 and UTF-16 too. Most older Macintosh platforms use CR for newline, while most Unices use LF (if they use in-file wrapping at all). This has lead to many issues, especially on the USENET, due to the fact that the files encoded on one system would often be decoded and displayed erratically on other systems.