File format

TXT - Plain Text File

TXT is text and nothing else. It has no formatting and no metadata of its own, which is exactly why it is the most durable document format there is.

A TXT file is a sequence of characters and nothing more. There is no bold, no font, no page size, no embedded picture, no header — just the letters, digits, punctuation and line breaks you typed. That absence is the format's entire value: a plain text file written forty years ago opens today in any editor on any operating system, which is a claim no other document format can make.

How a TXT stores text

Two invisible decisions determine whether a TXT file reads correctly, and both of them are outside the file's control.

The first is character encoding — the table that maps the bytes on disk to letters on screen. UTF-8 is the modern answer and handles every writing system; older files may be in a regional encoding such as Windows-1252, ISO-8859-1 or Shift_JIS. A plain text file does not say which one it uses, so a program has to guess. Guessing wrong is what produces the familiar é where an é should be. Some files begin with a short marker called a byte order mark that hints at the encoding, but it is optional and not always welcome.

The second is line endings. Windows ends a line with a carriage return followed by a line feed (CRLF); macOS and Linux use a line feed alone (LF). Mix them up and a file either runs together into one long line or shows a stray character at the end of every line.

Because a TXT file has no structure to compress or to corrupt halfway, it is also the format most likely to survive a bad transfer more or less intact.

What metadata a TXT carries

None. This is the honest answer and it is the interesting one.

A plain text file has no container, no header and nowhere to put an author, a title or a creation date. Everything a metadata report can tell you about a TXT comes from outside the file — from the filesystem that stores it and from analysing the bytes themselves: the file name, the size in bytes, the modification time the operating system recorded, the detected encoding, the line-ending style, and the character and line counts.

For anyone worried about what a document reveals, that makes plain text the safest thing to send. There is no author field to forget, no editing time, no software version, no thumbnail of an earlier draft. What you see in the file is what is in the file.

It also means the filesystem timestamp is the only date there is, and copying a file often resets it. If the date a text file was written matters, record it in the text.

When to use TXT

Use plain text for notes, logs, configuration, data you intend to process with other tools, and anything that must still be readable in decades. It is the right format when the words are the whole point.

It is the wrong format the moment you need a heading, a table, an image or a page break. Reach for Markdown if you want light structure while keeping the file readable, a word processor format if the document needs real layout, or PDF if it needs to look identical for every reader.