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

Files ending in .7z (7-Zip archive) use the MIME type application/x-7z-compressed.

Updated

application/x-7z-compressed
MIME type for .7z
Archives
Category
No
Compress with gzip/Brotli

What is the MIME type of .7z files?

The MIME type (media type) for 7-Zip archive files with the .7z extension is application/x-7z-compressed. Already compressed archive format.

Content-Type header

Content-Type: application/x-7z-compressed

Server configuration

ServerConfiguration
Nginx (mime.types or types {})application/x-7z-compressed 7z;
Apache (.htaccess)AddType application/x-7z-compressed .7z
IIS (web.config)<mimeMap fileExtension=".7z" mimeType="application/x-7z-compressed" />
Node.js / Expressres.type('7z') or res.setHeader('Content-Type', 'application/x-7z-compressed')
Amazon S3Set Content-Type: application/x-7z-compressed on the object (metadata), or pass --content-type application/x-7z-compressed to aws s3 cp

Should .7z files be compressed?

No. 7-Zip archive files are already compressed internally, so gzip or Brotli would waste CPU and barely reduce — sometimes even increase — the size. Leave application/x-7z-compressed out of your compression configuration.

Why the MIME type matters

Browsers decide what to do with a response — render, run, play or download — from the Content-Type header, not the file extension. With X-Content-Type-Options: nosniff, a wrong type causes stylesheets and scripts to be blocked outright. For uploads, never trust the type sent by the client; check the file’s content (its magic bytes) on the server.

MIME type lookupSearch every common file extension and MIME type, with copy-ready Content-Type headers.
Search all MIME types

Frequently asked questions

What is the MIME type for .7z?
application/x-7z-compressed.
How do I set the Content-Type for .7z in Nginx?
Make sure application/x-7z-compressed 7z; is listed in the types block (usually in /etc/nginx/mime.types) and reload Nginx.
Should I gzip .7z files?
No — the format is already compressed, so HTTP compression gives no benefit.