Sample TXT files
Plain text files that differ only in the ways that break text handling: Unix (LF) and Windows (CRLF) line endings, a UTF-8 file with a byte order mark, a UTF-8 file with accented, Greek, Cyrillic, CJK, Arabic and Hebrew text and an emoji, and a file encoded as Latin-1, which is not valid UTF-8. Free, no sign-up. Updated 19 November 2026.
What these files are
Plain text files that differ only in the ways that break text handling: Unix (LF) and Windows (CRLF) line endings, a UTF-8 file with a byte order mark, a UTF-8 file with accented, Greek, Cyrillic, CJK, Arabic and Hebrew text and an emoji, and a file encoded as Latin-1, which is not valid UTF-8.
Every file was generated by our own code, so nothing in them is copied from anyone, and we release them under CC0: use them for anything. The facts in the table were read back from each file after it was written, not typed in by hand.
About the format
A text file has no header saying which encoding it uses, so programs guess. UTF-8 is the default for most modern software; a byte order mark (EF BB BF) at the start is allowed, but it often shows up as stray characters such as  in programs that do not expect it. Windows ends a line with CR LF (two bytes), while Linux and macOS use LF alone.
These files open in any text editor. A web server should send them with the header Content-Type: text/plain.
5 files to download
| File | Size | What it is |
|---|---|---|
| sample.txt | 1 KB | plain UTF-8 (ASCII only), LF line endings lines: 9; line ending: LF; encoding: utf-8; valid utf8: yes |
| sample-crlf.txt | 1 KB | same text with Windows CRLF line endings lines: 9; line ending: CRLF; encoding: utf-8; valid utf8: yes |
| sample-utf8-multilingual.txt | 1 KB | UTF-8 with accented letters, Greek, Cyrillic, CJK, Arabic, Hebrew and an emoji lines: 10; line ending: LF; encoding: utf-8; valid utf8: yes |
| sample-utf8-bom.txt | 1 KB | UTF-8 starting with a byte order mark (EF BB BF) lines: 9; line ending: LF; encoding: utf-8-sig; valid utf8: yes |
| sample-latin1.txt | 1 KB | ISO-8859-1 (Latin-1) encoded; not valid UTF-8 lines: 10; line ending: LF; encoding: latin-1; valid utf8: no |
MIME type: text/plain. Total 5 KB.
Good for testing
- Encoding detection and conversion
- Line-ending handling in parsers and diffs
- Checking that a byte order mark does not end up in the first field
- Upload of a file that is not UTF-8
Check a file
file sample-*.txt
python -c "print(open('sample-latin1.txt', encoding='latin-1').readline())"Compare the SHA-256 checksum to make sure the download is complete and unchanged (sha256sum file on Linux, shasum -a 256 file on macOS, certutil -hashfile file SHA256 on Windows):
| File | SHA-256 |
|---|---|
| sample.txt | fd169222910a8f2b7a24d89c5e067b7f7ce64ea3c795ae6022a376a8634297e3 |
| sample-crlf.txt | 4c8688c9529d87fcb5990c49595d12fec60daadd1233b20635d3867c9cd4ad72 |
| sample-utf8-multilingual.txt | f023399fc55330d338b1574b62099d89e929b0b740a1eb2f7bb09a599696c1fa |
| sample-utf8-bom.txt | 127b91ca6336ea762073f025760876d1ce9bc18f23ea6530dbf712d0e27f3757 |
| sample-latin1.txt | ea42e4faa3daec52682f6867afdc528ece74ad1a1f7afd245d535333d8bf776b |