# Plain Text File

> A file of plain letters you can read. Any text app can open it.

**Field:** Software Development  
**Category:** Files & Formats  
**Also known as:** Text File, .txt File, Plain Text

## Think of it like

Think of it like a note on paper. Anyone can read it with just their eyes.

## Definition

A plain text file holds only letters, numbers and symbols. Every byte stands for a character you can read. It has no bold, no pictures and no hidden layout. Any text editor can open it. Code, CSV, JSON and Markdown files are all plain text. That is why tools like Git can compare them line by line.

## Example

Jack keeps his shopping list in notes.txt. He opens it on his phone, his laptop and a server, and it reads the same everywhere.

## Example code

```console
$ cat notes.txt
Buy milk
Call Jack at 5
```

A text file prints as lines you can read, because every byte is a letter.

## Why it matters

Plain text never locks you in. Any editor, on any system, can still open it.

## Common mistake

Writing code in a word processor. It adds hidden layout and curly quotes, and the code breaks.

## Three principles

- **Only characters.** Every byte is something you can read.
- **Opens anywhere.** Any text editor will do.
- **Easy to compare.** Tools can show the lines that changed.

## Related terms

- [Binary File](https://learn.benibix.com/term/development/binary-file)
- [Character Encoding](https://learn.benibix.com/term/development/character-encoding)
- [Line Ending](https://learn.benibix.com/term/development/line-ending)
- [Code Editor](https://learn.benibix.com/term/development/code-editor)
- [Markdown](https://learn.benibix.com/term/development/markdown)

## Taught in

- [Plain Text and Binary Files](https://learn.benibix.com/learn/development-formats/plain-text-and-binary-files): File Formats, 2/11

![Two panels. On the left, notes.txt, with .txt picked out, holds two readable lines, Buy milk and Call Jack at 5, and carries the label text/plain. On the right, photo.png, with .png picked out, holds rows of hex bytes starting 89 50 4E 47, and carries the label image/png. Notes under them say the ending after the dot is the file extension and the label is the media type a server sends.](https://learn.benibix.com/diagrams/dev2-file-types.svg)

---

Source: https://learn.benibix.com/term/development/plain-text-file
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-18
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
