# .odt MIME Type: application/vnd.oasis.opendocument.text

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

- MIME type: `application/vnd.oasis.opendocument.text`
- Extensions: .odt
- Content-Type header: `application/vnd.oasis.opendocument.text`
- Compress in transit: no (already compressed)
- File signature: `50 4B 03 04` (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`).

## Server configuration

### 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">
```

## FAQ

### 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

- [.docx — application/vnd.openxmlformats-officedocument.wordprocessingml.document](https://www.devkult.com/mime/docx.md)
- [.rtf — application/rtf](https://www.devkult.com/mime/rtf.md)
- [.pdf — application/pdf](https://www.devkult.com/mime/pdf.md)

Open the interactive page: https://www.devkult.com/mime/odt