What is a TXT file?
A TXT file contains nothing but characters: no fonts, sizes, colours, images or page layout. That is its whole point. Notes, logs, configuration, source code, subtitles and data exports use plain text because every program on every system can read it and because it stays readable for decades.
Two details are not stored in the file and must be guessed by the reading program: the character encoding (UTF-8 today, older code pages in legacy files) and the line-ending convention (LF on Linux and macOS, CR LF on Windows). Wrong guesses show up as odd symbols or as text on a single line.
When TXT is the right choice
Strengths
- Opens everywhere, from a phone to a server console
- Tiny files, easy to search, compare and process with scripts
- No hidden content: what you see is the entire file
Limitations
- No formatting at all: no bold, headings, tables or images
- Encoding and line endings can differ between systems
- Long documents are hard to navigate without structure
How to open a TXT file
Notepad, TextEdit, any code editor or a browser tab opens TXT. If accented or non-Latin characters look wrong, the editor picked the wrong encoding; most editors let you reopen the file as UTF-8 or another code page.
How to convert a TXT file
To add headings, fonts and tables, convert to a word-processor format: TXT to DOCX for Word, TXT to ODT for LibreOffice or TXT to RTF for older editors. In the other direction, DOCX to TXT strips a Word file down to its text, and OCR PDF to TXT reads text out of a scan.