WhyCrashed

.txt · text/plain

What is a .txt file?

Plain Text File

About the format

A .txt file is text with no formatting and no hidden structure — the simplest, safest, most durable file format there is. Every OS ships an editor for it, nothing about it can execute, and a text file written forty years ago still opens today. The only technicalities that ever surface are invisible ones. Encoding: modern files are UTF-8; files from old Windows tools may be ANSI (a legacy 8-bit code page) or UTF-16, and a file whose 'special characters look wrong' is being read with the wrong encoding — Notepad's Save As dialog shows and converts encodings. Line endings: Windows ends lines with CRLF, Unix with LF; Notepad has handled both since 2018, but a file that displays as one endless line in an ancient tool has Unix endings. And the extension-hiding caveat applies in reverse: 'file.txt.exe' with extensions hidden displays as 'file.txt' — one of the oldest tricks in the malware book, and a reason to keep 'File name extensions' visible in Explorer.

How to open a .txt file

Windows

  • Notepad
  • any editor ever written

macOS

  • TextEdit, any editor

Linux

  • any editor

Is a .txt file dangerous?

No — genuinely inert. The only trick is a disguised double extension pretending to be .txt.

Related file types

.log.ini.csv

Not sure what a file is? Check its bytes.

File names lie; magic numbers don't. Drop any file into the identifier — nothing is uploaded.

Identify a file →