Free FODT test files and sample generator

A LibreOffice Writer document saved as a single uncompressed XML file instead of a ZIP package. Generate valid .fodt sample files for XML tooling, diffing and version control tests.

Generate a .fodt file →

What is a .fodt file?

FODT: Flat OpenDocument Text. Flat ODT is the same OpenDocument content as a .odt, but written as one uncompressed XML file instead of a ZIP package. That makes it diffable and greppable, which is why it suits version control and XML tooling.

Why generate a test FODT file?

What you can put inside a .fodt file

You get 4 content options for FODT, so the file holds something meaningful rather than random padding: Paragraph text, Table, Numeric / figures, Multi-page. For FODT these are alternatives, so choose the one that matches what you need to test.

How a .fodt file is identified

A .fodt file has no signature at the start. A text format has no identifying leading bytes, so the extension and the reported media type are the only claims about it until a parser actually reads it, which is why validating uploads by extension alone is unsafe.

How the size lands on the exact byte

XML permits whitespace after the root element, so the padding goes there. The document still parses, and the tree is unchanged.

Negative testing with broken FODT files

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 FODT content

<?xml version="1.0" encoding="UTF-8"?>
<office:document office:mimetype="application/vnd.oasis.opendocument.text">
  <office:body><office:text>…</office:text></office:body>
</office:document>

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 validate as XML with `xmllint --noout file.fodt`.

Media type application/vnd.oasis.opendocument.text-flat-xml · extension .fodt · category Doc & TXT

Generate a .fodt file → · questions about sizes, privacy or cost are answered on the site FAQ.

Frequently asked questions about FODT files

What identifies a .fodt file?

Nothing at the start of the file does. A text format has no identifying leading bytes, so the extension and the reported media type are the only claims about it until a parser actually reads it, which is why validating uploads by extension alone is unsafe.

How can a .fodt file be an exact number of bytes?

XML permits whitespace after the root element, so the padding goes there. The document still parses, and the tree is unchanged.

What can go inside the FODT file?

There are 4 content options for .fodt: Paragraph text, Table, Numeric / figures, Multi-page. For FODT these are alternatives, so pick the one matching what you need to test.

Can I download several broken FODT files at once?

Yes, select more than one File Condition and you get one ZIP containing a .fodt per condition, each named after its condition.

Can the FODT file use UTF-16 or a byte-order mark?

No, and deliberately. A .fodt 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 FODT file?

Open in LibreOffice Writer, or validate as XML with xmllint --noout file.fodt.

Related Doc & TXT formats

PDF · DOCX · DOCM · TXT · DOC · MD · HTML · RTF

Browse all file formats →