# .bin MIME Type: application/octet-stream

> Arbitrary binary data — the fallback type for anything without a more specific one.

- MIME type: `application/octet-stream`
- Extensions: .bin
- Content-Type header: `application/octet-stream`
- Compress in transit: no (already compressed)

## Good to know

- Browsers download `application/octet-stream` responses instead of displaying them.
- Many servers use it as the default for unknown extensions; nginx's `default_type` sets it.
- Under `nosniff`, a script or stylesheet served as `application/octet-stream` is blocked.

## Server configuration

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

```
application/octet-stream bin;
```

### Apache (.htaccess or server config)

```
AddType application/octet-stream .bin
```

### Express

```
res.set("Content-Type", "application/octet-stream");
```

### Python

```
import mimetypes

mimetypes.add_type("application/octet-stream", ".bin")
```

### HTML file input

```
<input type="file" accept=".bin,application/octet-stream">
```

## FAQ

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

`application/octet-stream`.

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

`Content-Type: application/octet-stream`. It's already compressed, so servers shouldn't gzip it.

## Related types

- [.zip — application/zip](https://www.devkult.com/mime/zip.md)
- [.wasm — application/wasm](https://www.devkult.com/mime/wasm.md)
- [.txt — text/plain](https://www.devkult.com/mime/txt.md)

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