txt
What is a .txt file?
text/plain
TXT is a plain-text file containing unformatted character data with no styling or structure beyond line breaks. Its interpretation depends on character encoding, most commonly UTF-8, and on line-ending convention. It is the most universal and portable text container.
How to use a .txt file
Use an example TXT to test encoding detection, line-ending (LF versus CRLF) handling, and any tool that reads or streams raw text input.
Download example .txt files
- UTF-8 Text (LF)A UTF-8 text file with Unix (LF) line endings and no byte-order mark, containing accented and symbol characters — for testing charset detection.
- UTF-8 Text with BOM (CRLF)A UTF-8 text file that starts with a byte-order mark (EF BB BF) and uses Windows (CRLF) line endings — for testing BOM handling and line-ending detection.
- UTF-16 LE Text (CRLF)A UTF-16 little-endian text file with a BOM (FF FE) and CRLF line endings — for testing wide-character decoding and encoding detection.
- UTF-16 BE Text (BOM)A UTF-16 big-endian text file with a BOM (FE FF) and CRLF line endings — for testing wide-character decoding and byte-order detection.
- UTF-32 LE Text (BOM)A UTF-32 little-endian text file with a BOM (FF FE 00 00) — four bytes per code point, for testing full-width Unicode decoders and byte-order handling.
- Latin-1 (ISO-8859-1) TextA single-byte Latin-1 (ISO-8859-1) text file using high-range accented characters — for testing legacy 8-bit charset detection and transcoding to UTF-8.
- Windows-1252 TextA Windows-1252 text file using the 0x80–0x9F range (smart quotes, em dash, euro, bullet) that naive Latin-1 decoders get wrong — for testing codepage detection and transcoding.
- Shift-JIS Japanese TextA Shift-JIS encoded Japanese text file — a multi-byte East-Asian encoding, for testing CJK charset detection and Shift-JIS→UTF-8 conversion.
and 5 more in the library.