What Is a Text File?
What Is a Text File? GA S REGULAR Menu Lifewire Tech for Humans Newsletter! Search Close GO Software & Apps > File Types 53 53 people found this article helpful
Another example is the PDF file format; every file starts off with the %PDF text on the first line, even though the rest of the document is completely unreadable.
What Is a Text File?
How to open, edit, and convert text files
By Tim Fisher Tim Fisher Senior Vice President & Group General Manager, Tech & Sustainability Emporia State University Tim Fisher has more than 30 years' of professional technology experience. He's been writing about tech for more than two decades and serves as the VP and General Manager of Lifewire. lifewire's editorial guidelines Updated on June 8, 2022 Tweet Share Email Tweet Share EmailIn This Article
Expand Jump to a Section What Is a Text File Identify Text Files Open Text Files Open Files as Text Documents Convert Text Files Troubleshoot Jumbled Text Frequently Asked QuestionsWhat to Know
A text file contains just text (versus other content like images). Open one with any text editor, such as Notepad or TextEdit. Convert to other text-based formats with Notepad++ and similar tools. This article describes what a text file is and how to open one or convert one to a different format.What Is a Text File
A text file is a file containing text, but there are several ways to think about that, so it's important to know the kind of text document you have before dealing with a program that can open or convert it. Some text files use the .TXT file extension and don't contain any images. Others might contain both images and text, but still be called a text file or even abbreviated as a "txt file," which can be confusing.Types of Text Files
In the general sense, a text file refers to any file that has only text and is void of images and other non-text characters. These sometimes use the TXT file extension but don't necessarily need to. For example, a Word document that is an essay containing just text can be in the DOCX file format but still be called a text file. Another kind of text file is the "plain text" file. This is a file that contains zero formatting (unlike RTF files), meaning nothing is bold, italic, underlined, colored, using a special font, etc. Several examples of plain text file formats include ones that end in these file extensions: XML, REG, BAT, PLS, M3U, M3U8, SRT, IES, AIR, STP, XSPF, DIZ, SFM, THEME, and TORRENT. Of course, files with the .TXT extension are text files, too, and are commonly used to store things that can be easily opened with any text editor or written to with a simple script. Examples might include storing step-by-step instructions for how to use something, a place to hold temporary information, or logs generated by a program (though those are usually stored in a LOG file). "Plaintext," or cleartext files, are different than "plain text" files (with a space). If file storage encryption or file transfer encryption isn't used, the data can be said to exist in plaintext or be transferred over plaintext. This can be applied to anything that should be secured but isn't, be it emails, messages, plain text files, passwords, etc., but it's usually used in reference to cryptography.How to Open a Text File
All text editors should be able to open any text file, especially if there isn't any special formatting being used. For example, TXT files can be opened with the built-in Notepad program in Windows by right-clicking the file and choosing Edit. Similar for TextEdit on a Mac. Another free program that can open any text file is Notepad++. Once installed, you can right-click the file and choose Edit with Notepad++. The 4 Best Free Text Editors for Windows & Mac Most web browsers and mobile devices can open text files as well. However, since most of them aren't built to load text files using the various extensions you mind them using, you might need to first rename the file extension to .TXT if you want to use those applications to read the file. Some other text editors and viewers include Microsoft Word, TextPad, Notepad2, Geany, and Microsoft WordPad. Additional text editors for macOS include BBEdit and TextMate. Linux users can also try Leafpad, gedit, and KWrite.Open Any File as a Text Document
Something else to understand here is that any file can be opened as a text document, even if it doesn't contain readable text. Doing this is useful when you're not sure what file format it's really in, like if it's missing a file extension, or you think it's been identified with an incorrect file extension. For example, you can open an MP3 audio file as a text file by plugging it into a text editor like Notepad++. You can't play the MP3 this way, but you can see what it's made up of in text form, since the text editor is only able to render the data as text. With MP3s in particular, the very first line should include ID3 to indicate that it's a metadata container that might store information like an artist, album, track number, etc.Another example is the PDF file format; every file starts off with the %PDF text on the first line, even though the rest of the document is completely unreadable.