# .7z MIME Type: application/x-7z-compressed

> 7-Zip archives with high compression ratios.

- MIME type: `application/x-7z-compressed`
- Extensions: .7z
- Content-Type header: `application/x-7z-compressed`
- Compress in transit: no (already compressed)
- File signature: `37 7A BC AF 27 1C`

## Good to know

- Not natively supported by older Windows or macOS versions; ZIP is the safer choice for downloads aimed at everyone.

## Server configuration

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

```
application/x-7z-compressed 7z;
```

### Apache (.htaccess or server config)

```
AddType application/x-7z-compressed .7z
```

### Express

```
res.set("Content-Type", "application/x-7z-compressed");
```

### Python

```
import mimetypes

mimetypes.add_type("application/x-7z-compressed", ".7z")
```

### HTML file input

```
<input type="file" accept=".7z,application/x-7z-compressed">
```

## FAQ

### What is the MIME type for .7z files?

`application/x-7z-compressed`.

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

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

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

Check its bytes rather than the extension: 7Z files start with `37 7A BC AF 27 1C`. On the command line, `file --mime-type name.7z` does this for you.

## Related types

- [.zip — application/zip](https://www.devkult.com/mime/zip.md)
- [.rar — application/vnd.rar](https://www.devkult.com/mime/rar.md)
- [.gz — application/gzip](https://www.devkult.com/mime/gz.md)

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