guide · updated 2026-10-18

webm vs mp4: which one to use.

Use MP4 with H.264 when the video has to play everywhere, including older phones. Use WebM when a site asks for it, when you are embedding video on the web, or when you want an open, royalty-free format. For file size, the codec inside matters far more than which of the two containers wraps it.

Container versus codec

WebM and MP4 are containers: the box that holds the video track, the audio track and the timing information that keeps them in sync. The codec is how the pictures inside are compressed. Most confusion about the two formats comes from mixing these up.

What each container usually holds
WebMMP4
Based onMatroskaISO base media file format
Video codecsVP8, VP9, AV1H.264, H.265 (HEVC), AV1
Audio codecsVorbis, OpusAAC, among others
LicensingRoyalty-freeH.264 and HEVC are patent-licensed

Which is smaller

Neither, on its own. At the same bitrate, the same clip comes out the same size whichever container it is in; the container overhead is a few kilobytes. What changes is how good the picture looks at that size, and that is down to the codec.

Newer codecs need fewer bits for the same quality. VP9 and HEVC generally look noticeably better than H.264 at the same bitrate, and AV1 better again, at the cost of much slower encoding. VP8 is an older design, broadly in the same class as H.264.

Where each one plays

  • MP4 with H.264 plays on practically every phone, browser, TV and editing app made in the last fifteen years. It is the safe default.
  • WebM plays in Chrome, Firefox and Edge. Safari added WebM support in later releases, so older iPhones and Macs may refuse to play it.
  • Some sites only accept one. Image boards and some forums ask for WebM specifically; many social apps expect MP4 and convert anything else.

Converting between them

Going from an H.264 MP4 to WebM means re-encoding, because WebM does not carry H.264. Every re-encode loses a little detail, so start from the best copy you have, not one that has already been compressed for sharing.

The Basketweaver browser converter encodes VP8 WebM, which the in-browser encoder supports reliably on every desktop browser, and caps the file at 4 MB.

Open the converter to turn any clip into a WebM under 4 MB, or check the upload limit for your platform.