file in abyss
Back to formats

Document

ODT OpenDocument Text

OpenDocument Text is a document format commonly identified by .odt. Use the listed signatures, MIME types, and structure notes to validate files beyond the extension.

Extensions .odt
MIME application/vnd.oasis.opendocument.text

Magic numbers

Analyze your file
offset 0 OpenDocument Text leading signature
50 4B 03 04
PK..

Structure

  1. ZIP container
  2. mimetype
  3. META-INF/manifest.xml
  4. content.xml

Caveats

  • Do not trust the extension alone. Check the MIME type, the first bytes such as 50 4B 03 04, and format-specific structure when possible.
  • Container formats and damaged files can share the same opening bytes, so deeper validation may be required for production upload, preview, or conversion flows.

Detection example

SIGNATURE = bytes.fromhex("504b0304")
OFFSET = 0

def is_odt(path: str) -> bool:
    with open(path, "rb") as f:
        f.seek(OFFSET)
        head = f.read(len(SIGNATURE))
    return head == SIGNATURE

Practical usage

Use cases

OpenDocument Text is used for data exchange, imports, exports, parser testing, and validation workflows. Encoding, delimiters, versions, and container structure often change implementation behavior.

Common detection mistakes

  • The .odt extension alone does not prove the file contents. Upload and conversion flows should combine extension, MIME type, leading bytes, and format-specific structure checks.
  • OpenDocument Text can start with signatures such as 50 4B 03 04, but related containers and damaged files may require additional validation.

Security notes

Document formats may include scripts, attachments, macros, or external references. Sandbox previews and conversions, and avoid opening untrusted files directly.

Using samples

11 samples help test leading-byte detection, parser errors, upload limits, and download behavior.

Sample files

11 / 11 files
Sample Traits Size Source / license / SHA-256
Doc

Blue Sky ODT

Blue Sky ODT is a OpenDocument Text sample based on Wikimedia Commons. It can be used to test downloads, parsers, previews, and file type detection.

01-blue-sky.odt
Type Sample
1.1 KB
SHA-256 4a16330bb1805e4b7d0ab2e523ba9cc7bf0219cf9a9384d97b09dc25459fd5f9
Download
Doc

Flower Garden ODT

Flower Garden ODT is a OpenDocument Text sample based on Wikimedia Commons. It can be used to test downloads, parsers, previews, and file type detection.

02-flower-garden.odt
Type Sample
1.1 KB
SHA-256 c0d145f165569327022be523f69a86f1c7659b5ce24cf74fc9ab2bbd004fb2a1
Download
Doc

Navy Blue Sky ODT

Navy Blue Sky ODT is a OpenDocument Text sample based on Wikimedia Commons. It can be used to test downloads, parsers, previews, and file type detection.

03-navy-blue-sky.odt
Type Sample
1.1 KB
SHA-256 d7a75ff8c4c99ca8cb73fa3ccfc5f417f55e3c19a4b592142a7bd03425f47e08
Download
Doc

Nature of the Sky ODT

Nature of the Sky ODT is a OpenDocument Text sample based on Wikimedia Commons. It can be used to test downloads, parsers, previews, and file type detection.

04-nature-sky.odt
Type Sample
1.1 KB
SHA-256 f63c31e2a557698508e9bc958f9cbb778ba16461bf26f1c7de1344c7aaec0c4d
Download
Doc

Sky Landscape ODT

Sky Landscape ODT is a OpenDocument Text sample based on Wikimedia Commons. It can be used to test downloads, parsers, previews, and file type detection.

05-sky-landscape.odt
Type Sample
1.1 KB
SHA-256 b38aece434d89cc51695c01f9df78d7d927675ea53a1362d38dddcc8214d5526
Download
Doc

Starry Sky ODT

Starry Sky ODT is a OpenDocument Text sample based on Wikimedia Commons. It can be used to test downloads, parsers, previews, and file type detection.

06-starry-sky.odt
Type Sample
1.1 KB
SHA-256 e7ce9e296b6d2623a53fc00b4e4d34ae2de9bb92a9d03f9f9f19e9523fa5709f
Download
Doc

Blue Night Sky ODT

Blue Night Sky ODT is a OpenDocument Text sample based on Wikimedia Commons. It can be used to test downloads, parsers, previews, and file type detection.

07-blue-night-sky.odt
Type Sample
1.1 KB
SHA-256 9dbf72b8748dcc99367b785694e1f41a2b5d43ccf8bd3a2825815d4f4fa39695
Download
Doc

Hibiscus Flower ODT

Hibiscus Flower ODT is a OpenDocument Text sample based on Wikimedia Commons. It can be used to test downloads, parsers, previews, and file type detection.

08-hibiscus-flower.odt
Type Sample
1.1 KB
SHA-256 00ba59df483126840f6f2566d6a2b1c11556308a0aabbcf6a93c8fe86def8c2a
Download
Doc

Arctic Sky ODT

Arctic Sky ODT is a OpenDocument Text sample based on Wikimedia Commons. It can be used to test downloads, parsers, previews, and file type detection.

09-arctic-sky.odt
Type Sample
1.1 KB
SHA-256 b9cb434f38efb29b49d292032ec84f4155404fa87495fa495f3ae9e6fd049833
Download
Doc

Sunset Rays ODT

Sunset Rays ODT is a OpenDocument Text sample based on Wikimedia Commons. It can be used to test downloads, parsers, previews, and file type detection.

10-sunset-rays.odt
Type Sample
1.1 KB
SHA-256 1cda39a6715c4a15409447ff93de167a2d63de3cdb0c47157f2d90dd51491b39
Download
Doc

NASA Blue Marble ODT

NASA Blue Marble ODT is a OpenDocument Text sample based on NASA Image and Video Library. It can be used to test downloads, parsers, previews, and file type detection.

nasa-blue-marble-2012-east.odt
Type Sample
1.1 KB
SHA-256 afede466a4a8b02370ef80e200fcd16f023a060e792d79631b3b44ce9de0b214
Download

Frequently asked questions

What is the magic number (file signature) of OpenDocument Text?

OpenDocument Text files begin with the byte signature 50 4B 03 04 ("PK.."). Detect the format by reading these leading bytes rather than trusting the file extension alone.

What is the MIME type of OpenDocument Text?

The MIME type for OpenDocument Text is application/vnd.oasis.opendocument.text.

What file extension does OpenDocument Text use?

OpenDocument Text files use the .odt extension. The extension is a convention only and does not guarantee the file contents, so combine it with signature and structure checks.

Related formats