Guide
MP4 vs WebM vs MOV: which video format to use
Containers versus codecs, what each browser plays, and a practical default for web video in 2026.
“MP4 vs WebM” is really two questions: which container (the file wrapper) and which codec (how the pictures are compressed). The container decides what tracks and metadata the file can hold; the codec decides quality, file size and whether a device can decode it at all.
Containers
| Container | Typical codecs | Where you’ll see it |
|---|---|---|
MP4 (.mp4) | H.264, H.265, AV1 + AAC | Everywhere: phones, cameras, the web |
WebM (.webm) | VP9, AV1 + Opus | Web video, screen recordings from Chrome |
MOV (.mov) | H.264, H.265, ProRes | iPhone and Mac recordings, video editing |
MKV (.mkv) | Anything | Downloads, multi-track and multi-subtitle files |
MP4 and MOV are closely related (both come from the QuickTime file format), which is why browsers usually play an H.264 .mov even though MOV isn’t a web format.
Codecs and browser support
- H.264 (AVC) plays everywhere. It is the safe default. 1080p H.264 sample
- H.265 (HEVC) is about 40% smaller at the same quality. It plays in Safari, and in Chrome and Edge only when the hardware supports it. HEVC sample
- VP9 is royalty-free and supported by all modern browsers, including Safari 14.1+ on macOS. VP9 WebM sample
- AV1 is the most efficient of these. It is supported in Chrome, Firefox and Edge, and in Safari 17+ on devices with hardware decoding. AV1 WebM sample
A practical default
Serve H.264 MP4 as the baseline and add an AV1 or VP9 source for browsers that can use it:
<video controls playsinline preload="metadata">
<source src="video-av1.webm" type='video/webm; codecs="av01.0.08M.08"'>
<source src="video-h264.mp4" type="video/mp4">
</video>The browser picks the first source it can play. Always encode MP4 with -movflags +faststart so the index (the moov atom) sits at the start of the file. Without it, the browser has to fetch the end of the file before playback can begin. Compare a faststart file with one whose moov atom is at the end.
Things that break players
Phones record portrait video as landscape pixels plus a rotation flag. Players that ignore the flag show it sideways (rotated sample). Screen recordings are often variable frame rate, which trips editors and frame-accurate seeking (VFR sample). HDR video looks washed out on SDR screens unless it is tone-mapped (HDR10 sample).
See the video playback use case for the full set.