devkult_
tools29converters34
home/mime/.odt

.odt MIME type

OpenDocument textdocuments

application/vnd.oasis.opendocument.text

LibreOffice and OpenOffice text documents (ISO/IEC 26300).

MIME typeapplication/vnd.oasis.opendocument.text
Extensions.odt
Content-Typeapplication/vnd.oasis.opendocument.text
Compress in transit?No — already compressed
File signature50 4B 03 04 (PK..)
the ZIP signature — this format is a ZIP archive inside

Good to know

  • Spreadsheets and presentations use application/vnd.oasis.opendocument.spreadsheet (.ods) and …presentation (.odp).

Serve .odt files with the right type

The response header to send:

Content-Type: application/vnd.oasis.opendocument.text

Most servers pick the type from the file extension. If yours sends the wrong one, map it explicitly:

nginx (inside the types block in mime.types)
application/vnd.oasis.opendocument.text odt;
Apache (.htaccess or server config)
AddType application/vnd.oasis.opendocument.text .odt
Express
res.set("Content-Type", "application/vnd.oasis.opendocument.text");
Python
import mimetypes

mimetypes.add_type("application/vnd.oasis.opendocument.text", ".odt")
HTML file input
<input type="file" accept=".odt,application/vnd.oasis.opendocument.text">

Check it

See what a server sends for a file, and what type a local file really is by its contents:

curl -sI https://example.com/file.odt | grep -i '^content-type:'
file --mime-type file.odt

Frequently asked questions

What is the MIME type for .odt files?

application/vnd.oasis.opendocument.text.

What Content-Type header should a .odt file be served with?

Content-Type: application/vnd.oasis.opendocument.text. It's already compressed, so servers shouldn't gzip it.

How can I tell if a file is really a .odt?

Check its bytes rather than the extension: ODT files start with 50 4B 03 04 (PK..) — the ZIP signature — this format is a ZIP archive inside. On the command line, file --mime-type name.odt does this for you.

Related types

Headers that go with it: Content-Type · Content-Disposition · X-Content-Type-Options