Free RTF sample files
A text-based document format from Microsoft that predates DOCX and is still accepted by most word processors. Download valid RTF test files in 4 exact sizes, from 1 KB to 1 MB, each with a checksum.
- Extension
- .rtf
- MIME type
- application/rtf
- Kind
- Text
- Category
- Documents
RTF files by size
Every file below is a valid Rich Text Format 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.
| File | Size | Contents | Download |
|---|---|---|---|
| 1 KB RTF samplesample-rtf-1kb.rtf | 1 KB1,024 bytes | Sections: 2 | Download RTF |
| 10 KB RTF samplesample-rtf-10kb.rtf | 10 KB10,240 bytes | Sections: 28 | Download RTF |
| 100 KB RTF samplesample-rtf-100kb.rtf | 100 KB102,400 bytes | Sections: 288 | Download RTF |
| 1 MB RTF samplesample-rtf-1mb.rtf | 1 MB1,048,576 bytes | Sections: 2,949 | Download RTF |
What is an RTF file?
RTF stores formatted text as plain ASCII, using backslash control words such as \b for bold and braces for grouping. It was designed for exchanging documents between different word processors.
Because it is readable text, RTF is easy to generate from code, but it can also carry embedded objects, which is why security tools treat it with care.
How to recognise an RTF file
| Extension | .rtf |
|---|---|
| MIME type | application/rtf |
| Also seen as | text/rtf |
| Latest version | 1.9.1 (2008) |
| Encoding | 7-bit ASCII with escapes for other characters |
| Structure | Nested groups in braces with control words |
| Can contain | Formatted text, tables, images, embedded objects |
What to test for
These are the behaviours that most often go wrong when software handles RTF files.
- Two MIME types are in use, application/rtf and text/rtf, and allow-lists should recognise both.
- RTF readers must skip groups they do not understand; a parser that fails on unknown control words is not conformant.
Strengths of RTF
- Carries basic formatting between almost any two word processors.
- Plain ASCII, so it survives systems that mangle binary files.
Limitations of RTF
- Much larger than DOCX for the same document, especially with images.
- No longer developed, and inconsistently supported beyond basic formatting.
Typical uses of RTF test files
- Testing legacy document import
- Checking converters and text extraction
- Verifying upload filters that allow or block RTF
Software that opens RTF
- Microsoft Word and WordPad
- Apple TextEdit
- LibreOffice Writer
- Google Docs (import)
Related
RTF sample files: questions
- Do the RTF samples contain embedded objects?
- No. They contain only formatted text: bold headings and paragraphs in a single font.
- What is the MIME type of an RTF file?
- The MIME type is application/rtf. You will also meet text/rtf in practice. The file extension is .rtf.
- Is a sample RTF file the same as a dummy or example RTF file?
- Yes. Sample, test, dummy and example RTF files are different names for the same thing: an RTF 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 RTF file.