Free ODT test files and sample generator
The open ISO-standard word-processing format used by LibreOffice and OpenOffice. Default document format on Ubuntu and other Linux desktops.
What is a .odt file?
ODT: OpenDocument Text. ODT is the OpenDocument text document, the native format of LibreOffice Writer and an ISO standard. Public-sector and open-source workflows often require it, so document handling should not assume Microsoft formats only.
Why generate a test ODT file?
- Verify a document pipeline handles OpenDocument, not just OOXML.
- Test conversion between ODT and DOCX.
- Check text extraction and preview rendering.
What you can put inside a .odt file
You get 7 content options for ODT, so the file holds something meaningful rather than random padding: Paragraph text, Table, Numeric / figures, Multi-page, Image, Bar chart, Pie chart. Pick several and they are merged into one file, with a section, sheet, slide or folder for each.
How a .odt file is identified
Every .odt file begins with 50 4B 03 04, the ASCII letters "PK", the initials of Phil Katz, who created the ZIP format. That is what a validator inspecting content rather than the file name looks for.
How the size lands on the exact byte
The package is a ZIP, so the padding is trailing whitespace inside one of the XML parts it already contains. Extractors and Office readers both ignore it, so the document opens unchanged.
Negative testing with broken ODT files
- Invalid. Identifiable, but wrong inside, so it fails during parsing.
- Corrupted. The leading bytes are destroyed, so the
50 4B 03 04identifying a .odt is gone. Same length as the valid file. - Incomplete. Truncated part-way, so it is genuinely shorter.
- Empty. Chosen under Content rather than File Condition: valid structure, no data.
Which failure to reach for, and what to assert for each, is covered in how to make a corrupted file for testing. For upload limits and type checks see testing file upload validation.
Sample ODT content
[OpenDocument], headings, paragraphs, tables and styles (ODF).
This shows the shape of the file. Your download is generated fresh at the size you choose, so the values will differ.
How to open and verify the file
Open in LibreOffice Writer, or in Word (which reads ODT).
Media type application/vnd.oasis.opendocument.text · extension .odt · category Doc & TXT
Generate a .odt file → · questions about sizes, privacy or cost are answered on the site FAQ.
Frequently asked questions about ODT files
What identifies a .odt file?
A .odt file begins with the bytes 50 4B 03 04, the ASCII letters "PK", the initials of Phil Katz, who created the ZIP format. Those bytes are what a content-sniffing validator looks for, and what the Corrupted condition destroys.
How can a .odt file be an exact number of bytes?
The package is a ZIP, so the padding is trailing whitespace inside one of the XML parts it already contains. Extractors and Office readers both ignore it, so the document opens unchanged.
What can go inside the ODT file?
There are 7 content options for .odt: Paragraph text, Table, Numeric / figures, Multi-page, Image, Bar chart, Pie chart. Choose more than one and they are combined into a single file, a section, sheet, slide or folder per option, rather than downloaded separately.
Can I download several broken ODT files at once?
Yes, select more than one File Condition and you get one ZIP containing a .odt per condition, each named after its condition.
Can the ODT file use UTF-16 or a byte-order mark?
No, and deliberately. A .odt file is a container rather than plain text, so rewriting its bytes as UTF-16 would not produce a UTF-16 document. It would produce a broken file. Use a text format such as CSV, JSON or XML for encoding tests.
How do I open or verify the ODT file?
Open in LibreOffice Writer, or in Word (which reads ODT).