Free TXT sample files

Unformatted text with no structure beyond characters and line breaks. The simplest possible upload. Download valid TXT test files in 10 exact sizes, from 1 KB to 10 MB, each with a checksum.

Extension
.txt
MIME type
text/plain
Kind
Text
Category
Documents

TXT files by size

Every file below is a valid Plain text file of exactly the stated size. Open a file's page for its checksum and contents, and to preview it in your browser before downloading.

TXT sample files by size
FileSizeContentsDownload
1 KB TXT samplesample-txt-1kb.txt 1 KB1,024 bytes Numbered lines: 8 Download TXT
5 KB TXT samplesample-txt-5kb.txt 5 KB5,120 bytes Numbered lines: 49 Download TXT
10 KB TXT samplesample-txt-10kb.txt 10 KB10,240 bytes Numbered lines: 101 Download TXT
25 KB TXT samplesample-txt-25kb.txt 25 KB25,600 bytes Numbered lines: 255 Download TXT
50 KB TXT samplesample-txt-50kb.txt 50 KB51,200 bytes Numbered lines: 512 Download TXT
100 KB TXT samplesample-txt-100kb.txt 100 KB102,400 bytes Numbered lines: 1,028 Download TXT
500 KB TXT samplesample-txt-500kb.txt 500 KB512,000 bytes Numbered lines: 5,148 Download TXT
1 MB TXT samplesample-txt-1mb.txt 1 MB1,048,576 bytes Numbered lines: 10,547 Download TXT
5 MB TXT samplesample-txt-5mb.txt 5 MB5,242,880 bytes Numbered lines: 52,743 Download TXT
10 MB TXT samplesample-txt-10mb.txt 10 MB10,485,760 bytes Numbered lines: 105,488 Download TXT

More TXT samples

Hand-designed files with realistic content or a specific edge case.

Curated TXT sample files
FileSizeContentsDownload
UTF-8 text in many scriptssample-text-utf8-multilingual.txt 906 B906 bytes Scripts: Latin, Greek, Cyrillic, Arabic, Hebrew, Devanagari, Thai, Chinese, Japanese, Korean, emoji Download TXT
Plain text with Windows (CRLF) line endingssample-text-crlf-line-endings.txt 740 B740 bytes Lines: 20 Download TXT
Empty file (0 bytes)empty-file.txt 0 B0 bytes Lines: 0 Download TXT
File name with spacessample file name with spaces.txt 34 B34 bytes File name length: 32 characters Download TXT
File name with non-ASCII characterssample-ünïcödé-文件-имя.txt 75 B75 bytes File name scripts: Latin with diacritics, Han, Cyrillic Download TXT
File with a 120-character namesample-long-file-name-abcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghij-end.txt 36 B36 bytes File name length: 120 characters Download TXT
File without an extensionsample-file-without-extension 61 B61 bytes ASCII text Download TXT

What is a TXT file?

A plain-text file is a sequence of characters with no markup, fonts or layout. What the bytes mean depends on the character encoding: today that is almost always UTF-8, which is identical to ASCII for unaccented English text.

Plain text has no signature bytes, so software identifies it by exclusion: if a file contains no control bytes and decodes as valid text, it is treated as text.

How to recognise a TXT file

No signature bytes. TXT files are identified by parsing their content.

Extension.txt
MIME typetext/plain
EncodingUTF-8 is the modern default; ASCII is a subset of it
Line endingsLF on Unix and macOS, CRLF on Windows
Byte order markOptional in UTF-8 (EF BB BF) and best avoided
SignatureNone

What to test for

These are the behaviours that most often go wrong when software handles TXT files.

Strengths of TXT

  • Readable by every program ever written.
  • No structure to break: a partly damaged file is still mostly usable.

Limitations of TXT

  • The file does not say which character encoding it uses.
  • No formatting, structure or metadata of any kind.

Typical uses of TXT test files

  • Baseline upload and download tests
  • Checking encoding handling
  • Testing line-ending normalisation
  • Measuring transfer speed with compressible content

Software that opens TXT

  • Every text editor and IDE
  • Notepad, TextEdit, VS Code, Vim
  • Command-line tools such as cat, less, grep and wc

Specifications

Related

TXT sample files: questions

Why does each line start with numbers?
Each line carries its line number and the byte offset where it begins. If a transfer is truncated or corrupted you can see exactly where.
Which encoding do the text samples use?
The sized samples use only ASCII characters, which makes them valid UTF-8, ASCII and Latin-1 at once. A separate multilingual sample covers non-ASCII text.
What is the MIME type of a TXT file?
The MIME type is text/plain. The file extension is .txt.
Is a sample TXT file the same as a dummy or example TXT file?
Yes. Sample, test, dummy and example TXT files are different names for the same thing: a TXT file with known contents that stands in for a real one. Any file on this page will do wherever a tutorial or a test plan asks for a dummy TXT file.