Download Sample RTF Files (Rich Text Format)
Download free sample RTF files. Developed by Microsoft in 1987, RTF is a cross-platform format readable by almost any text editor. Use these files to test recursive parsing logic (nested groups) and raw hex image handling. STANDARD Cross-Platform Text File Name Contents / Specs Size Action simple_formatting.rtf Basic Styles Contains Bold, Italic, Underline, and multiple…
Download free sample RTF files. Developed by Microsoft in 1987, RTF is a cross-platform format readable by almost any text editor. Use these files to test recursive parsing logic (nested groups) and raw hex image handling.
STANDARD
Cross-Platform Text
| File Name | Contents / Specs | Size | Action |
|---|---|---|---|
| simple_formatting.rtf Basic Styles |
Contains Bold, Italic, Underline, and multiple fonts/colors. Readable by WordPad and TextEdit. | 5 KB | Download |
| tables_and_lists.rtf Structure Test |
Complex layout with nested tables and bullet points. Tests conversion fidelity to HTML/PDF. | 20 KB | Download |
| unicode_chars.rtf Encoding |
RTF handles Unicode poorly (using `\uN` control words). Tests display of Japanese/Emoji characters. | 10 KB | Download |
QA / SECURITY
OLE Objects, Image Bloat & Corruption
| Test Case | Description | Size | Action |
|---|---|---|---|
| Image Hex Dump (Bloat) | Performance Test. Contains a single high-res image stored as raw Hexadecimal text. Explodes file size and slows down parsers. | 25 MB | Download |
| Embedded OLE Object | Security Risk. Contains an embedded object (e.g., calculator.exe link). Tests if your viewer blocks external execution. | 50 KB | Download |
| Unbalanced Braces | Missing a closing curly brace `}`. This causes “stack overflow” or infinite loops in poorly written parsers. | 1 KB | Download |
Technical Specs: RTF
- 7-bit ASCII: RTF files are safe to transfer over legacy systems because they only use standard ASCII characters. Non-ASCII chars are escaped.
- Control Words: Formatting is defined by backslashes.
\bturns bold on,\b0turns it off.\parstarts a new paragraph. - MIME Type:
application/rtfortext/rtf.
Frequently Asked Questions
DOCX is a compressed ZIP format. RTF is raw text. Furthermore, RTF stores images by converting binary pixels into hexadecimal text (e.g. `FF00A2…`), which doubles the size of the image data.
Yes. While it doesn’t support VBA Macros like Word, it supports “OLE Objects” and memory overflow exploits. Hackers often obfuscate malicious code by inserting random RTF control words that humans can’t see but machines execute.
How to view raw RTF?
RTF is just text. You can open it in standard editors to inspect the control codes.
- Notepad++ / VS Code: Open the file here to see the
{\rtf1\ansi...}headers and inspect potential corruption or malicious code. - WordPad: The lightweight native Windows viewer. It handles RTF faster than Microsoft Word.
- LibreOffice: Useful for converting RTF to PDF via command line.
Developer’s Corner: Extract Plain Text
Don’t try to parse RTF with Regex (it’s recursive!). Use the Python library striprtf to convert it to a clean string.
from striprtf.striprtf import rtf_to_textwith open(“document.rtf”, “r”) as f:
content = f.read()
plain_text = rtf_to_text(content)
print(plain_text)
