Document sample files
PDF, Word, OpenDocument, plain text, Markdown, RTF and HTML files for testing document handling.
Formats in this category
| Format | What it is | Sizes |
|---|---|---|
| PDF sample files.pdf application/pdf | Fixed-layout documents that look the same on every device. The most common format for upload forms that accept documents. | 5 KB to 20 MB |
| DOCX sample files.docx application/vnd.openxmlformats-officedocument.wordprocessingml.document | The default Microsoft Word format since 2007: a ZIP package of XML parts. | 50 KB to 10 MB |
| ODT sample files.odt application/vnd.oasis.opendocument.text | The word-processor format of LibreOffice and the OpenDocument standard: a ZIP package of XML parts. | 10 KB to 1 MB |
| TXT sample files.txt text/plain | Unformatted text with no structure beyond characters and line breaks. The simplest possible upload. | 1 KB to 20 MB |
| RTF sample files.rtf application/rtf | A text-based document format from Microsoft that predates DOCX and is still accepted by most word processors. | 1 KB to 1 MB |
| Markdown sample files.md text/markdown | Lightweight markup that reads well as plain text and converts to HTML. | 1 KB to 1 MB |
| HTML sample files.html text/html | The markup language of web pages. As an upload it needs careful handling because browsers will execute it. | 1 KB to 1 MB |
About these files
Document uploads are the most common kind of file a business application accepts: CVs, contracts, invoices, reports and scanned forms. They are also the most varied, ranging from a few bytes of plain text to a multi-megabyte PDF.
These samples cover fixed-layout documents (PDF), editable word-processor formats (DOCX, ODT and RTF) and the text formats that documents are often converted to or from. Each is available in a range of exact sizes, so you can test both content handling and size limits.
Ready-made samples
Hand-designed files with realistic content or a specific edge case.
| File | Format | Size | Contents | Download |
|---|---|---|---|---|
| Sample business report PDF (multi-page)sample-business-report.pdf | 399 KB408,822 bytes | Page size: A4 (595 x 842 pt) | Download PDF | |
| Sample invoice PDF (single page)sample-invoice.pdf | 2.25 KB2,304 bytes | Pages: 1 | Download PDF | |
| UTF-8 text in many scriptssample-text-utf8-multilingual.txt | 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 | TXT | 740 B740 bytes | Lines: 20 | Download TXT |
| Empty file (0 bytes)empty-file.txt | TXT | 0 B0 bytes | Lines: 0 | Download TXT |
| File name with spacessample file name with spaces.txt | TXT | 34 B34 bytes | File name length: 32 characters | Download TXT |
| File name with non-ASCII characterssample-ünïcödé-文件-имя.txt | 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 | TXT | 36 B36 bytes | File name length: 120 characters | Download TXT |
| File without an extensionsample-file-without-extension | TXT | 61 B61 bytes | ASCII text | Download TXT |
| Sample PDF with 10 pagessample-pdf-10-pages.pdf | 12.6 KB12,855 bytes | Pages: 10 | Download PDF | |
| Sample PDF with images (3 pages)sample-pdf-with-images.pdf | 1.45 MB1,521,229 bytes | Pages: 3 | Download PDF | |
| Sample PDF with form fields (fillable)sample-pdf-form-fields.pdf | 7.75 KB7,938 bytes | Fields: 7 | Download PDF |
Popular downloads by size
Jump straight to a file. Every size is exact to the byte.
Or browse every format at one size: 1 KB, 5 KB, 10 KB, 25 KB, 50 KB, 100 KB, 200 KB, 500 KB, 1 MB, 2 MB, 5 MB, 10 MB, 20 MB.
What to test
- File upload testing
Test an upload form or endpoint with files of every size and type it should accept, and several it should refuse.
- File parser testing
Well-formed files and deliberate edge cases for testing code that reads CSV, JSON, XML, PDF and more.
- MIME type testing
Files with correct, documented signatures for testing type detection and upload allow-lists.
Related categories
Document files: questions
- Which document format should I test first?
- PDF. It is the format most upload forms see in production, and it has a clear signature and a clear failure mode when truncated.
- Do any of these documents contain macros or scripts?
- No. None of the document samples contain macros, scripts or embedded files. One curated PDF has fillable form fields and another is password-protected; each says so on its page.
- Is there a corrupted document for testing error handling?
- Yes. The curated library has a truncated PDF and a truncated DOCX, both labelled as deliberately invalid, for checking that your application fails cleanly.