# .apk MIME Type: application/vnd.android.package-archive

> Android app packages. The type tells Android browsers the download is an installable app.

- MIME type: `application/vnd.android.package-archive`
- Extensions: .apk
- Content-Type header: `application/vnd.android.package-archive`
- 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

- Served with a generic type, some Android browsers save the file as `.zip` or `.bin` instead.

## Server configuration

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

```
application/vnd.android.package-archive apk;
```

### Apache (.htaccess or server config)

```
AddType application/vnd.android.package-archive .apk
```

### Express

```
res.set("Content-Type", "application/vnd.android.package-archive");
```

### Python

```
import mimetypes

mimetypes.add_type("application/vnd.android.package-archive", ".apk")
```

### HTML file input

```
<input type="file" accept=".apk,application/vnd.android.package-archive">
```

## FAQ

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

`application/vnd.android.package-archive`.

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

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

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

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

## Related types

- [.jar — application/java-archive](https://www.devkult.com/mime/jar.md)
- [.zip — application/zip](https://www.devkult.com/mime/zip.md)

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