.mp4 MIME Type: video/mp4

Files ending in .mp4 (MPEG-4 video) use the MIME type video/mp4.

Updated

video/mp4
MIME type for .mp4
Video
Category
No
Compress with gzip/Brotli

What is the MIME type of .mp4 files?

The MIME type (media type) for MPEG-4 video files with the .mp4 extension is video/mp4. Must support range requests (Accept-Ranges: bytes, 206 responses) so users can seek; without them Safari may refuse to play the video.

Content-Type header

Content-Type: video/mp4

Server configuration

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

Should .mp4 files be compressed?

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