# .zip MIME Type: application/zip

> The universal archive format.

- MIME type: `application/zip`
- Extensions: .zip
- Also seen as: `application/x-zip-compressed`
- Content-Type header: `application/zip`
- 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

- Windows browsers often report ZIP uploads as `application/x-zip-compressed`; accept both.
- DOCX, XLSX, PPTX, EPUB, JAR and APK files are all ZIP archives, so the signature alone doesn't identify them.
- Watch for zip bombs and path traversal (`../`) in entry names when extracting user uploads.

## Server configuration

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

```
application/zip zip;
```

### Apache (.htaccess or server config)

```
AddType application/zip .zip
```

### Express

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

### Python

```
import mimetypes

mimetypes.add_type("application/zip", ".zip")
```

### HTML file input

```
<input type="file" accept=".zip,application/zip">
```

## FAQ

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

`application/zip`. You may also see `application/x-zip-compressed`, but `application/zip` is the one to send.

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

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

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

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

## Related types

- [.gz — application/gzip](https://www.devkult.com/mime/gz.md)
- [.tar — application/x-tar](https://www.devkult.com/mime/tar.md)
- [.7z — application/x-7z-compressed](https://www.devkult.com/mime/7z.md)
- [.rar — application/vnd.rar](https://www.devkult.com/mime/rar.md)

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