OpenDocument Text
ODT is the OpenDocument Text format, an ISO-standardized (ISO/IEC 26300) open document format based on ZIP-packaged XML. Default save format for LibreOffice Writer, ODT provides a vendor-neutral alternative to DOCX with full support for formatted text, images, and tables.
OpenDocument rendering requires a full office suite layout engine not available in browser WASM.
Common questions
What is the difference between ODT and DOCX?
ODT is an ISO-standardized open format (ISO/IEC 26300) used by LibreOffice and OpenOffice. DOCX is Microsoft's Office Open XML format (ECMA-376). Both are ZIP archives containing XML, but they use different XML schemas. DOCX has broader software support due to Microsoft Word's market dominance.
Can Microsoft Word open ODT files?
Yes, Word 2007 SP2 and later versions can open and save ODT files directly. Some advanced ODF features like complex styles and tracked changes may render differently in Word compared to LibreOffice.
Why do governments require ODT format?
ODT is an ISO international standard with no vendor lock-in. Multiple independent software implementations exist (LibreOffice, OpenOffice, Calligra). Governments in the EU, Brazil, and India mandate ODF to ensure long-term document accessibility without dependence on any single vendor.
How do I convert ODT to DOCX without losing formatting?
Use LibreOffice from the command line: libreoffice --headless --convert-to docx input.odt. This preserves most formatting, styles, and tables. For documents with complex tracked changes, verify the output in Word before distributing.
What makes .ODT special
What is an ODT file?
ODT (OpenDocument Text) is an open-standard document format based on the ODF (OpenDocument Format) specification. It's the default format for LibreOffice Writer and Apache OpenOffice Writer, providing a vendor-neutral alternative to Microsoft's DOCX format.
Continue reading — full technical deep dive
How to open ODT files
- LibreOffice Writer (Windows, macOS, Linux) — Free, native support
- Apache OpenOffice (Windows, macOS, Linux) — Free
- Microsoft Word (2007+) — Import support
- Google Docs (Web) — Free, online editing
- Apple Pages (macOS, iOS) — Import support
Technical specifications
| Property | Value |
|---|---|
| Format | OpenDocument Format (ODF) |
| Standard | ISO/IEC 26300 |
| Container | ZIP archive with XML content |
| Macros | Supported (StarBasic, Python) |
| Version | ODF 1.3 (latest) |
Programs that open ODT files
- LibreOffice Writer — Native open-source editor
- Apache OpenOffice — Legacy open-source office
- Google Docs — Free online editor
- Microsoft Word — Compatibility mode
- Calligra Words — KDE office suite
Common use cases
- Open-source workflow: Document creation without proprietary software
- Government documents: Required by some governments (ISO standard)
- Academic work: Free alternative to Word
- Long-term archival: Vendor-neutral open standard
.ODT compared to alternatives
| Formats | Criteria | Winner |
|---|---|---|
| .ODT vs .DOCX | Open standard compliance ODT is an ISO standard (ISO/IEC 26300) developed by OASIS with multiple independent implementations. DOCX is ECMA-376/ISO 29500 but was developed primarily by Microsoft with fewer independent implementations of the full spec. | ODT wins |
| .ODT vs .DOCX | Software ecosystem and market share DOCX is the default for Microsoft Word, which dominates corporate and academic document workflows. ODT requires LibreOffice or explicit Word compatibility mode, creating friction for most recipients. | DOCX wins |
| .ODT vs .PDF | Editability vs. fidelity ODT preserves full document structure for editing — paragraphs, styles, tables, and tracked changes. PDF is a final-form format optimized for viewing, not collaborative editing. | ODT wins |
| .ODT vs .RTF | Feature completeness ODT supports advanced features like tracked changes, embedded vector graphics, mathematical formulas (MathML), and master documents. RTF lacks many modern document features and has been deprecated by Microsoft since 2008. | ODT wins |
Technical reference
- MIME Type
application/vnd.oasis.opendocument.text- Magic Bytes
50 4B 03 04ZIP archive containing content.xml and META-INF/manifest.xml.- Developer
- OASIS / ISO
- Year Introduced
- 2005
- Open Standard
- Yes — View specification
ZIP archive containing content.xml and META-INF/manifest.xml.
Binary Structure
ODT files are standard ZIP archives with a required internal structure defined by the ODF specification. The ZIP must begin with a 'mimetype' file as the first entry, stored uncompressed (no deflation) — this allows file identification tools to read the MIME type at a fixed offset without decompressing the archive. The mimetype file contains the ASCII string 'application/vnd.oasis.opendocument.text'. Following the mimetype entry, the ZIP contains: META-INF/manifest.xml (manifest listing all files and their media types), content.xml (the document body — text paragraphs, tables, lists, frames, all in ODF XML namespace), styles.xml (page layouts, paragraph/character styles, headers/footers, master pages), meta.xml (Dublin Core metadata: title, author, creation date, word/page counts), and settings.xml (application-specific view settings like zoom level and cursor position). Images and embedded objects are stored in a Pictures/ directory. The ODF XML uses namespaces extensively: text: for paragraphs and spans, table: for spreadsheet-like tables, draw: for shapes and images, style: for formatting, fo: for XSL-FO properties. Content.xml is the authoritative source — all visible document text lives in <text:p> and <text:h> elements within <office:text>.
| Offset | Length | Field | Example | Description |
|---|---|---|---|---|
0x00 | 4 bytes | ZIP Local File Header Signature | 50 4B 03 04 | Standard ZIP magic bytes (PK\x03\x04). Identifies the file as a ZIP archive. |
0x1A | 2 bytes | Filename length | 08 00 | Length of the first filename entry. For valid ODT, this should be 8 (for 'mimetype'). |
0x1E | 8 bytes | First filename | 6D 69 6D 65 74 79 70 65 | ASCII 'mimetype'. ODF spec requires this as the first ZIP entry, stored uncompressed. |
0x26 | 39 bytes | Mimetype content | application/vnd.oasis.opendocument.text | The MIME type string. Must be uncompressed so file identification tools can read it at a known offset. |
Attack Vectors
- Macro execution — ODT supports StarBasic and Python macros that can execute system commands if the user enables macro execution
- Malicious embedded objects — OLE objects and linked external resources can trigger code execution or network requests
- XXE (XML External Entity) attacks — crafted content.xml can reference external DTDs to exfiltrate local file content during parsing
- ZIP bomb — a specially crafted ODT archive can decompress to enormous size, exhausting memory or disk space
Mitigation: FileDex does not open or parse ODT files in the browser. ODT is a reference-only page. Users should disable macros by default in LibreOffice (Tools > Options > Security > Macro Security) and avoid enabling macros from untrusted sources.