File types · Explainer

The ODT file (.odt, .fodt)

An ODT file is an OpenDocument Text document, the word-processing format of LibreOffice and an open ISO standard: a ZIP package of XML files. This guide explains what's inside one, how it compares with DOCX, the compatibility issues worth knowing, and has free sample ODT files to download for testing.

At a glance

Full name
OpenDocument Text, part of the Open Document Format for Office Applications (ODF)
Extensions
.odt; templates .ott; single-file flat XML .fodt
MIME type
application/vnd.oasis.opendocument.text (registered with IANA by OASIS)
Kind
Binary: a ZIP package of XML files and images
Standard
OASIS OpenDocument 1.4 (October 2025); ISO/IEC 26300 (ODF 1.0 in 2006, ODF 1.2 in 2015)
First released
2005, as OASIS ODF 1.0, based on the OpenOffice.org XML format
Opens with
LibreOffice Writer, Microsoft Word, Google Docs, Collabora Online, ONLYOFFICE, Apache OpenOffice
Magic number
50 4B 03 04 (ZIP), then mimetype at byte 30 and application/vnd.oasis.opendocument.text at byte 38
Default format of
LibreOffice and Apache OpenOffice

The basics

What is an ODT file?

ODT is the word-processing member of the OpenDocument Format (ODF), an open standard for office documents. It's the format LibreOffice Writer and Apache OpenOffice save in by default, and Microsoft Word, Google Docs and most other word processors can open and save it. Its siblings are ODS for spreadsheets and ODP for presentations.

The format grew out of the XML format of OpenOffice.org, which Sun Microsystems gave to the OASIS standards body in 2002. OASIS approved ODF 1.0 in 2005, and ISO published it as ISO/IEC 26300 in 2006. No single company controls it, and anyone can implement it without paying licence fees.

  • It's a package. Text, styles, metadata, settings and images are separate files inside a ZIP archive.
  • It's XML. Every part except the images is readable text, so programs can create and change documents without a word processor.
  • Its layout isn't fixed. Like DOCX, the app that opens the file lays out the pages with the fonts it has. Send a PDF when the layout must not move.

Anatomy

What's inside an ODT file

Rename an .odt to .zip and you can open it like any archive. Our sample-minimal.odt has only the three entries LibreOffice needs to open it, written by hand. Here they are, part by part.

sample-minimal.odt (file list and XML)
$ unzip -l sample-minimal.odt
  Length      Date    Time    Name
---------  ---------- -----   ----
       39  2026-10-27 12:00   mimetype
      447  2026-10-27 12:00   content.xml
      391  2026-10-27 12:00   META-INF/manifest.xml

Bytes 0-76: 50 4B 03 04 … "mimetype" "application/vnd.oasis.opendocument.text"

content.xml:
<?xml version="1.0" encoding="UTF-8"?>
<office:document-content
    xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0"
    xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0"
    office:version="1.3">
  <office:body>
    <office:text>
      <text:h text:outline-level="1">Hello, world.</text:h>
      <text:p>Sample ODT from 99helpers.com/file-types/odt</text:p>
    </office:text>
  </office:body>
</office:document-content>

META-INF/manifest.xml (the two entries):
<manifest:file-entry manifest:full-path="/" manifest:version="1.3"
    manifest:media-type="application/vnd.oasis.opendocument.text"/>
<manifest:file-entry manifest:full-path="content.xml"
    manifest:media-type="text/xml"/>
  1. 150 4B 03 04

    The ZIP signature

    Every ODT is a ZIP file, so it starts with PK. ODF only allows entries that are stored or compressed with Deflate, and doesn't use ZIP's own encryption.

  2. 2mimetype

    The mimetype entry

    A file whose whole content is the document's MIME type, with no line break. The standard says it must be the first entry in the ZIP, uncompressed and without an extra field, so the type sits at a fixed place: the name at byte 30, the type at byte 38. That lets file and upload checks tell an ODT from any other ZIP by reading the first 80 bytes.

  3. 3content.xml

    The content

    The text, tables, lists and images, in order, plus the automatic styles for direct formatting. It's the part that matters most.

  4. 4<office:document-content …>

    The root element and namespaces

    Declares the ODF namespaces. The prefixes office:, text:, table:, draw: and style: come from here.

  5. 5office:version="1.3"

    The ODF version

    Which version of the standard the file claims. LibreOffice 24.2 writes 1.3; Microsoft 365 writes 1.4.

  6. 6<office:body> <office:text>

    The body

    office:text marks a word-processing document. A spreadsheet has office:spreadsheet here, a presentation office:presentation.

  7. 7<text:h text:outline-level="1">

    A heading

    Headings are their own element with an outline level, unlike DOCX, where a heading is a paragraph with a heading style. Navigators and tables of contents use the level.

  8. 8<text:p>

    A paragraph

    Ordinary paragraphs. Formatting inside a paragraph is a text:span with a style name.

  9. 9META-INF/manifest.xml

    The manifest

    Lists every entry in the package with its media type. The entry for / repeats the document type. Encryption details go here too, per file.

  10. 10(no styles.xml, meta.xml, settings.xml)

    What's missing

    A file saved by a word processor also has named styles, metadata, application settings, a thumbnail and pictures. When they're absent, the app uses its defaults.

Under the hood

The parts of a typical ODT

A document saved by LibreOffice, such as our sample-document.odt, has more entries than the minimal file above:

EntryWhat it holds
mimetypeapplication/vnd.oasis.opendocument.text, first and uncompressed.
content.xmlThe text, tables, lists, frames and automatic styles (direct formatting).
styles.xmlNamed styles such as Heading 1 and Text Body, page layouts, headers and footers.
meta.xmlTitle, subject, keywords, author, dates, word and page counts, custom properties.
settings.xmlApplication settings: zoom, view, printer. Not part of the content.
Pictures/Images in their original formats, renamed by LibreOffice.
Thumbnails/thumbnail.pngA small picture of the first page, used by file managers.
manifest.rdfRDF metadata, added by LibreOffice.
Configurations2/Toolbar and menu customisations; usually empty folders.
META-INF/manifest.xmlThe list of every entry and its type, plus encryption data.

Styles are split in two. Named styles, the ones you pick from a list, live in styles.xml. Automatic styles are created for direct formatting, such as making one word bold, and live in content.xml with names like P4 or T1.

Flat ODT: one XML file

The standard also allows a single XML file with an office:document root that holds the meta, settings, styles and content one after another, with images embedded as Base64. LibreOffice saves this as Flat XML ODF Text Document (.fodt). It's larger, but easy to diff, keep in version control or generate with XML tools. Our sample-flat-xml.fodt is the featured document in this form.

Versions

ODF versions and the ISO standard

VersionOASIS StandardISO/IEC
ODF 1.0May 200526300:2006
ODF 1.1February 2007Amendment to 26300, 2012
ODF 1.2September 201126300-1, -2 and -3:2015
ODF 1.3April 2021New edition being published in parts, 2025–2026
ODF 1.4October 2025Not yet

Each version adds features rather than replacing the format, so files stay readable. ODF 1.2 added digital signatures, RDF metadata and OpenFormula for spreadsheet formulas. ODF 1.3 added document encryption with OpenPGP keys, among other things. LibreOffice writes an "Extended" flavour of the current version, which may include its own extra markup in a separate namespace; Tools, Options, Load/Save, General lets you choose a strict version instead.

Microsoft 365's Word, Excel and PowerPoint read and write ODF 1.4 from version 2404, before OASIS formally approved it.

Comparison

ODT vs DOCX vs DOC vs PDF

ODTDOCXDOCPDF
StructureZIP of XMLZIP of XMLBinaryBinary objects and streams
Made forEditingEditingEditingFinal, fixed pages
Open standardYes (OASIS, ISO/IEC 26300)Yes (ECMA-376, ISO/IEC 29500)Documented, not a standardYes (ISO 32000)
Native appLibreOfficeMicrosoft WordWord 97–2003Any viewer
MacrosYes, in the same extensionNo (.docm for macros)YesNo (but JavaScript)
Opens in a browserNo, it downloadsNo, it downloadsNoYes

In practice: ODT and DOCX do the same job. Use the native format of the app you and your readers edit in, because each app handles its own format best. Send a PDF when the result must look the same everywhere.

Troubleshooting

Compatibility problems and how to avoid them

  • Fonts change. LibreOffice's defaults are Liberation and DejaVu fonts, Word's are Aptos or Calibri. If the other computer doesn't have the font, it substitutes one with different widths, and lines and pages break differently. Use common fonts, embed them (LibreOffice: File, Properties, Font), or send a PDF.
  • Word drops or changes some features. Microsoft documents what Word can't keep when it saves ODT: for example SmartArt becomes a group of shapes, caption numbering fields (SEQ) become plain text, macros are removed and only drop-down content controls survive.
  • Layout differences. Each app has its own layout engine. Text boxes, frames anchored to pages, complex tables and section breaks are where documents differ most.
  • "The file is corrupt" after editing it by hand. If you unzip and rezip an ODT, mimetype must go back in first and uncompressed. With Info-ZIP: zip -X0 new.odt mimetype then zip -Xr new.odt . -x mimetype.
  • My system calls it a ZIP file. A detector that only reads the first 4 bytes sees ZIP. Check bytes 30 to 76 for the mimetype, as described above.
  • Tracked changes or comments show up for others. They're part of the file until you accept or reject every change (Edit, Track Changes, Manage) and delete the comments.

How to

How to open, edit and convert an ODT file

  • LibreOffice Writer (free; Windows, macOS, Linux) opens and saves ODT natively. Collabora Office and ONLYOFFICE edit it too.
  • Microsoft Word: File, Open works directly; to save, choose File, Save As and **OpenDocument Text (*.odt)**.
  • Google Docs: upload the file to Google Drive and open it with Google Docs. File, Download, OpenDocument Format (.odt) saves one.
  • In a browser: browsers can't display ODT, so a link to one downloads it. For reading in the browser, export a PDF.
  • Convert: soffice --headless --convert-to pdf file.odt (or docx, fodt, txt). pandoc file.odt -o file.md turns it into Markdown, keeping headings, lists, tables and links.
  • Programming: odfpy (Python), the ODF Toolkit (Java) and LibreOffice's own UNO API read and write ODT. Since it's XML, plain XML tools can read content.xml too.

Security

Security, privacy and password protection

Unlike DOCX, ODT has no separate extension for documents with macros: any .odt can contain LibreOffice Basic or other scripts, stored in a Basic/ or Scripts/ folder in the package. LibreOffice's default macro security only runs macros that are signed by a trusted source or stored in a trusted location, and blocks unsigned ones. Don't lower that setting because a document tells you to. As with any office suite, keep LibreOffice updated: it publishes security fixes several times a year.

Password protection in ODT is not ZIP encryption. Each part (content, styles, meta, settings, pictures) is compressed, then encrypted separately, and the manifest records how. Our sample-password.odt was saved by LibreOffice 24.2 with AES-256-CBC and a key derived with PBKDF2 over 100,000 iterations. What that means in practice:

  • The list of parts stays visible. Anyone can unzip the file and see which entries exist and their sizes; the manifest itself isn't encrypted.
  • The metadata is encrypted. LibreOffice encrypts meta.xml too, and leaves out the thumbnail, so title and first page don't leak.
  • Older files are weaker. The original ODF scheme used Blowfish with SHA-1; documents from old versions of OpenOffice.org may still be protected that way.

What an ODT reveals

Author names in the properties, comments and tracked changes; deleted text that's still tracked; edit counts and dates in meta.xml. Before sharing, accept or reject all changes, delete comments, and in LibreOffice clear the user data (File, Properties, General: uncheck Apply user data and Reset Properties), or send a PDF.

ODF is also used by governments that prefer open formats. In 2014 the UK government made ODF its standard for sharing and collaborating on editable government documents, with PDF/A or HTML for viewing; the Library of Congress lists policies in Norway, Portugal, France and Brazil as well.

Free downloads

Sample ODT files to download

Free sample OpenDocument Text files for testing converters, previews, parsers and uploads. They were written with odfpy and saved by LibreOffice 24.2, then checked with unzip -t, odfpy and a LibreOffice export to PDF. The password for the protected one is 99helpers.

sample-document.odt · 39.3 KBDownload

Browsers can't show this kind of file in a page. Download it to open it in the app it belongs to.

What's inside sample-document.odt

A two-page A4 document with the features you'll meet in real ODT files. Browsers can't preview ODT, so there's no live preview; open it in LibreOffice, Word or Google Docs, or rename a copy to .zip to see the parts.

  1. Document properties

    Title, subject, description, keywords, the fictional author Ada Example, fixed dates and a custom Source property, in meta.xml. LibreOffice shows them under File, Properties.

  2. Named styles

    Title, Heading 1, Heading 2, Text Body, Caption, a custom Note style with a border and background, and character styles for bold, italic and code, all in styles.xml.

  3. Headings

    text:h elements with outline levels 1 and 2, so they appear in the Navigator and would feed a table of contents.

  4. Lists

    A bulleted list and a numbered list, each a text:list with its own list style.

  5. A table

    A five-row table:table with a header row that repeats on each page, and number cells stored with office:value-type="float".

  6. An image

    An original PNG bar chart in Pictures/, placed in a draw:frame with a caption below.

  7. Header, footer and fields

    A header line and a footer with page number and page count fields that show "Page 1 of 2".

  8. Link and Unicode

    A hyperlink to this page and a line of text in French, Japanese, Greek and Russian.

All sample ODT files

  • Two-page sample document

    sample-document.odt · 39.3 KB (40,264 bytes)

    A realistic A4 document saved by LibreOffice: properties, named styles, headings, lists, a table, an image with a caption, a header, a footer with page fields and a link.

    • Testing converters and previews
    • Checking parsers against a typical ODT
  • Minimal ODT, three entries

    sample-minimal.odt · 781 bytes

    Only mimetype, content.xml and META-INF/manifest.xml, written by hand: no styles, metadata or settings. It's the file shown in the anatomy above.

    • Parser tests: don't assume optional parts exist
    • Learning the package structure
  • Tracked changes and comments

    sample-tracked-changes.odt · 16.9 KB (17,288 bytes)

    Meeting notes with a deletion ("Tuesday"), two insertions and two comments by the fictional Ada Example and Bram Voorbeeld, one comment anchored to a range of text.

    • Testing how tools handle revisions and comments
    • Privacy and metadata-cleaning checks
  • Password-protected ODT

    sample-password.odt · 25.1 KB (25,708 bytes)

    The sample document saved with a password: 99helpers. Every part is encrypted with AES-256 and listed in the manifest with its encryption data; there's no thumbnail.

    • Password prompts and wrong-password errors
    • Upload filters and indexers that meet encrypted documents
  • Flat XML ODT (.fodt)

    sample-flat-xml.fodt · 67.3 KB (68,960 bytes)

    The sample document as one XML file with an office:document root and the PNG embedded as Base64. LibreOffice also writes an empty office:scripts element; there are no macros.

    • Seeing the whole format in one readable file
    • Testing XML-based tools and diffs

Ways to test with them

  • File type detection: all four .odt files start with PK and have mimetype at byte 30. A detector that reports application/zip isn't looking at it.
  • Text extraction: in sample-tracked-changes.odt, decide what your extractor should output: the deleted "Tuesday", the inserted "Thursday" or both. The deleted text sits in text:tracked-changes at the top of the body, not in the paragraph.
  • Conversion fidelity: convert sample-document.odt to DOCX or PDF and check the table header, the image, the Note style and the page fields.
  • Defensive parsing: sample-minimal.odt has no styles.xml or meta.xml. Code that assumes they exist will fail on it.
  • Encryption: open sample-password.odt with 99helpers, and check what your tool does without it: the ZIP opens, but content.xml is unreadable.

Free to use for testing, teaching and demos, commercially or not, with no attribution needed. A link back to this page is always appreciated.

Put it online

Have an ODT file? Give it a link.

Drop an ODT on 99helpers and it gets its own link. Browsers can't display ODT files, so visitors download it and open it in LibreOffice, Word or Google Docs; to have it read in the browser, upload a PDF version.

Questions

ODT files, frequently asked

What is an ODT file?

An OpenDocument Text document: the word-processing format of LibreOffice and an open OASIS and ISO standard. It's a ZIP package of XML files holding the text, styles and images.

How do I open an ODT file?

With LibreOffice Writer (free), Microsoft Word (File, Open), or Google Docs after uploading it to Google Drive. Browsers can't display it directly.

Can Microsoft Word open ODT files?

Yes. Word opens and saves ODT, and Microsoft 365 supports ODF 1.4. Some features, such as SmartArt and certain fields, are changed or lost when Word saves ODT.

Is ODT better than DOCX?

Neither is better in general. Both are open, XML-based standards. ODT is native to LibreOffice, DOCX to Word; each app handles its own format best, so use the one your readers edit in.

How do I convert ODT to PDF or DOCX?

In LibreOffice, File, Export as PDF, or File, Save As and choose Word. In Word, open it and Save As. On a server: soffice --headless --convert-to pdf file.odt.

Why does my ODT look different in Word?

Different default fonts and layout engines. If a font is missing, a substitute with different widths moves line and page breaks. Use common fonts, embed them, or share a PDF.

What is an FODT file?

A flat OpenDocument Text file: the same document as one uncompressed XML file instead of a ZIP package, with images embedded as Base64. LibreOffice opens and saves it.

Can an ODT file contain a virus?

It can contain macros, and documents can exploit bugs in the app that opens them. LibreOffice blocks unsigned macros by default; keep it updated and don't enable macros in documents you didn't expect.

Related formats

Other file types explained

Keep going

Related

Sources

Last reviewed 27 October 2026.