.epub MIME Type: application/epub+zip

Files ending in .epub (EPUB e-book) use the MIME type application/epub+zip.

Updated

application/epub+zip
MIME type for .epub
Documents
Category
No
Compress with gzip/Brotli

What is the MIME type of .epub files?

The MIME type (media type) for EPUB e-book files with the .epub extension is application/epub+zip. A ZIP archive of XHTML chapters.

Content-Type header

Content-Type: application/epub+zip

Server configuration

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

Should .epub files be compressed?

No. EPUB e-book files are already compressed internally, so gzip or Brotli would waste CPU and barely reduce — sometimes even increase — the size. Leave application/epub+zip 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 .epub?
application/epub+zip.
How do I set the Content-Type for .epub in Nginx?
Make sure application/epub+zip epub; is listed in the types block (usually in /etc/nginx/mime.types) and reload Nginx.
Should I gzip .epub files?
No — the format is already compressed, so HTTP compression gives no benefit.