We are independent & ad-supported. We may earn a commission for purchases made through our links.
Advertiser Disclosure
Our website is an independent, advertising-supported platform. We provide our content free of charge to our readers, and to keep it that way, we rely on revenue generated through advertisements and affiliate partnerships. This means that when you click on certain links on our site and make a purchase, we may earn a commission. Learn more.
How We Make Money
We sustain our operations through affiliate commissions and advertising. If you click on an affiliate link and make a purchase, we may receive a commission from the merchant at no additional cost to you. We also display advertisements on our website, which help generate revenue to support our work and keep our content free for readers. Our editorial team operates independently of our advertising and affiliate partnerships to ensure that our content remains unbiased and focused on providing you with the best information and recommendations based on thorough research and honest evaluations. To remain transparent, we’ve provided a list of our current affiliate partners here.
Software

Our Promise to you

Founded in 2002, our company has been a trusted resource for readers seeking informative and engaging content. Our dedication to quality remains unwavering—and will never change. We follow a strict editorial policy, ensuring that our content is authored by highly qualified professionals and edited by subject matter experts. This guarantees that everything we publish is objective, accurate, and trustworthy.

Over the years, we've refined our approach to cover a wide range of topics, providing readers with reliable and practical advice to enhance their knowledge and skills. That's why millions of readers turn to us each year. Join us in celebrating the joy of learning, guided by standards you can trust.

What is a Text File?

By D.M. Abrecht
Updated: May 17, 2024
Views: 30,754
Share

A text file is a computer file that stores a typed document as a series of alphanumeric characters, usually without visual formatting information. The content may be a personal note or list, a journal or newspaper article, a book, or any other text that can be rendered accurately in typewritten form. Text files are similar to word processing files in that the content of both is primarily textual; they differ in that text files usually do not record information such as character style and size, pagination, or other details that would specify the appearance of a finished document. Some computer operating systems make a basic distinction between a text file, which is intended to be translated directly into human-readable text, and a binary file, which is interpreted directly by the computer.

In most of the schemes used for encoding text, each character is assigned a numeric value, with the text then written as a string of binary numbers. One family of encoding schemes, called the American Standard Code for Information Interchange (ASCII), became a widely-used standard early in the history of computing, despite its poor support for languages other than English. The ISO 8859 family of codes has provided much better support for languages based on the Latin alphabet and similar alphabets, but has been unable to encode the characters from East Asian languages like Japanese, leading to a proliferation of incompatible standards.

More recently, the Unicode® Consortium has been developing an encoding system called Unicode® that has the goal of assigning a unique number to every character used in every language on earth. This will allow a single code to be used for every language, and allow texts from multiple languages to appear in a single file. The first portion of Unicode is based on ISO 8859, which is itself based on ASCII. Using Unicode® can have advantages even in English-speaking countries, as text encoded using older schemes may display minor inconsistencies when moved from system to system.

Advantages of text files include small size and versatility. Kilobytes or megabytes smaller than the same data stored in other formats, they can be rapidly and massively exchanged via email or disk. Most can be opened on computers running diverse operating systems, using very basic software. The primary disadvantage is the lack of formatting. A text file may be a poor choice for representing a document that contains images or that relies on design elements to communicate its meaning — a file containing tabular data, mathematical formulas, or concrete poetry, for instance.

Text files are generally intended to be read and edited by humans, but not all of them contain content that is primarily for human consumption. Most programming code is stored in a text file prior to being compiled — that is, translated into a machine-readable binary file. Files may also contain machine-readable textual tags that give formatting information in addition to plain text. For instance, a Hypertext Markup Language (HTML) file can be opened as a plain text file in a text editor, or display as a formatted web page after being interpreted by a web browser. Similar schemes include LaTeX, used for laying out scientific papers, and Extensible Markup Language (XML), used for structuring data.

Share
WiseGeek is dedicated to providing accurate and trustworthy information. We carefully select reputable sources and employ a rigorous fact-checking process to maintain the highest standards. To learn more about our commitment to accuracy, read our editorial process.

Editors' Picks

Discussion Comments
By anon271128 — On May 25, 2012

How can I store a data table in a text file on a day to day basis?

Share
https://www.wisegeek.net/what-is-a-text-file.htm
Copy this link
WiseGeek, in your inbox

Our latest articles, guides, and more, delivered daily.

WiseGeek, in your inbox

Our latest articles, guides, and more, delivered daily.