# .ODS MIME Type and Content-Type Header

> LibreOffice Calc spreadsheets — the OpenDocument counterpart to .xlsx.

- MIME type: `application/vnd.oasis.opendocument.spreadsheet`
- Extensions: .ods
- Content-Type header: `application/vnd.oasis.opendocument.spreadsheet`
- 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

- Every OpenDocument file begins with an uncompressed `mimetype` entry holding its full type. That's how tools tell `.ods`, `.odt` and `.odp` apart despite the shared ZIP signature.
- Excel opens `.ods` files, but formulas and formatting don't always survive the round trip.

## Server configuration

### nginx (inside the types block in mime.types)

```
application/vnd.oasis.opendocument.spreadsheet ods;
```

### Apache (.htaccess or server config)

```
AddType application/vnd.oasis.opendocument.spreadsheet .ods
```

### Express

```
res.set("Content-Type", "application/vnd.oasis.opendocument.spreadsheet");
```

### Python

```
import mimetypes

mimetypes.add_type("application/vnd.oasis.opendocument.spreadsheet", ".ods")
```

### HTML file input

```
<input type="file" accept=".ods,application/vnd.oasis.opendocument.spreadsheet">
```

## FAQ

### What is the MIME type for .ods files?

`application/vnd.oasis.opendocument.spreadsheet`.

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

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

### How can I tell if a file is really a .ods?

Check its bytes rather than the extension: ODS 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.ods` does this for you.

## Related types

- [.xlsx — application/vnd.openxmlformats-officedocument.spreadsheetml.sheet](https://www.devkult.com/mime/xlsx.md)
- [.csv — text/csv](https://www.devkult.com/mime/csv.md)
- [.odt — application/vnd.oasis.opendocument.text](https://www.devkult.com/mime/odt.md)
- [.odp — application/vnd.oasis.opendocument.presentation](https://www.devkult.com/mime/odp.md)

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