Free TXT sample, test and dummy files

Unformatted text with no structure beyond characters and line breaks. The simplest possible upload. Download valid TXT test files in 19 exact sizes, from 1 KB to 100 MB, each with a checksum. Or create one of any size up to 1 GB.

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

Create a TXT file of any size

Choose any size from 210 bytes to 1 GB. The file is made in your browser, so nothing is downloaded from our server. Smaller files usually finish quickly; generation time depends on your device and format. Larger ones are streamed straight into your downloads list in browsers that support it (current Chrome, Edge and Firefox on computers and Android); elsewhere, such as Safari and every browser on iPhone and iPad, the largest size is lower and is shown below.

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 Lines: 7 Download TXT
5 KB TXT samplesample-txt-5kb.txt 5 KB5,120 bytes Lines: 47 Download TXT
10 KB TXT samplesample-txt-10kb.txt 10 KB10,240 bytes Lines: 97 Download TXT
25 KB TXT samplesample-txt-25kb.txt 25 KB25,600 bytes Lines: 249 Download TXT
50 KB TXT samplesample-txt-50kb.txt 50 KB51,200 bytes Lines: 500 Download TXT
100 KB TXT samplesample-txt-100kb.txt 100 KB102,400 bytes Lines: 1,004 Download TXT
200 KB TXT samplesample-txt-200kb.txt 200 KB204,800 bytes Lines: 2,012 Download TXT
500 KB TXT samplesample-txt-500kb.txt 500 KB512,000 bytes Lines: 5,035 Download TXT
1 MB TXT samplesample-txt-1mb.txt 1 MB1,048,576 bytes Lines: 10,315 Download TXT
2 MB TXT samplesample-txt-2mb.txt 2 MB2,097,152 bytes Numbered lines: 21,096 Download TXT
3 MB TXT samplesample-txt-3mb.txt 3 MB3,145,728 bytes Lines: 30,951 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
15 MB TXT samplesample-txt-15mb.txt 15 MB15,728,640 bytes Lines: 154,768 Download TXT
20 MB TXT samplesample-txt-20mb.txt 20 MB20,971,520 bytes Numbered lines: 210,979 Download TXT
25 MB TXT samplesample-txt-25mb.txt 25 MB26,214,400 bytes Lines: 257,949 Download TXT
30 MB TXT samplesample-txt-30mb.txt 30 MB31,457,280 bytes Lines: 309,539 Download TXT
50 MB TXT samplesample-txt-50mb.txt 50 MB52,428,800 bytes Lines: 505,944 Download TXT
100 MB TXT samplesample-txt-100mb.txt 100 MB104,857,600 bytes Lines: 1,011,891 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

TXT files have no file signature, the magic bytes that most binary formats begin with.

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.