Compress a WebM file

WebM is the one format on this site where the honest advice starts with "you may not gain much". It is already an efficient container with an efficient codec inside, so it pays to know what you are trading before you re-encode it.

Drop your video here

or click to browse — MP4, MKV, MOV, WebM, AVI and more

Typical codec inside
VP9 or VP8 video, Opus or Vorbis audio
Output here
VP9 with Opus audio, encoded by libvpx-vp9; MP4 with H.264 if you need reach
Remux available
Not into WebM — a copied H.264 stream has no legal home in the container

WebM is already the efficient option

WebM is an open, royalty-free container built for the web, and what is usually inside it is VP9 video with Opus audio. VP9 is a generation newer than H.264 and reaches comparable perceived quality at a meaningfully lower bitrate; Opus is similarly strong at low audio bitrates.

That has a consequence people find counter-intuitive: a WebM file is often already close to as small as it can reasonably get. Where an over-exported MP4 might have half its bitrate removed without anyone noticing, a WebM produced by a competent encoder has much less slack. Compressing it further is a real quality trade rather than the removal of waste.

Where WebM files do have slack

Two cases are worth checking before you conclude there is nothing to gain.

  • Browser-recorded WebM. Files produced by MediaRecorder — screen recordings from web apps, webcam captures in the browser — are typically VP8 rather than VP9 and are encoded in real time at a generous bitrate. There is often a great deal to remove.
  • WebM at the wrong resolution. Efficiency of the codec does not help if the file is 1440p and it is being displayed at 640 pixels wide. Downscaling gains just as much on WebM as on anything else.

What a WebM export from this page actually is

Picking WebM as the output gives you VP9 video from libvpx-vp9 with Opus audio, which is the pairing the container was designed around. The audio conversion is not optional: WebM will not hold an AAC track, so even with the audio control set to keep the original, the track is re-encoded to Opus.

The cost is time. VP9 in WebAssembly runs well behind H.264 on the same machine, and on a long clip that gap is the difference between waiting and giving up. If the file only needs to be smaller and the codec is beside the point, MP4 finishes sooner.

Remux is refused when the output is WebM, and the refusal is correct rather than a missing feature. Remux copies the video stream as it stands, and WebM accepts VP8, VP9 or AV1 and nothing else, so an H.264 stream copied out of an MP4 would fail at the mux. Choose MKV if what you want is the original stream in a different wrapper.

WebM or MP4 for the web

For a video you are embedding yourself and serving repeatedly, WebM with VP9 is usually the better file, and the standard approach is to offer both: a <video> element with a WebM source first and an MP4 source after it, so browsers take the efficient option and everything else falls back gracefully. You can produce both here, one run each, as long as you are willing to sit through the VP9 pass.

For a file you are emailing, messaging or handing to an unknown device, MP4 every time. The web compression guide covers the delivery side in more detail.

WebM compression questions

Is WebM smaller than MP4?

At the same visual quality, usually yes — VP9 is more efficient per bit than H.264, often by a substantial margin on detailed footage. The trade is encoding time and compatibility: VP9 is much slower to encode, and MP4 with H.264 plays on more devices. Both routes are available here, so the choice is yours to make rather than the tool's.

Can this tool re-encode my file to VP9?

Yes. Set the output format to WebM and VP9 is the codec you get, since it is the only one the container will hold here. Expect it to take noticeably longer than the same job in H.264, and expect the audio to come out as Opus regardless of what went in. AV1 is the one generation the build has no encoder for.

Can I convert WebM to MP4 here?

Yes. Set the output format to MP4 and the video is re-encoded to H.264. Remuxing WebM into MP4 is not a useful route, because VP9 in an MP4 container is not widely playable — the conversion has to re-encode.

Compressing to a size limit instead?

If what brought you here is a number rather than the fact that it is a WebM file, start from the ceiling instead. Each of these opens the compressor with that target already set, ready for your WebM:

Other formats

The formats reference puts WebM beside the other containers and shows which codec combinations play where.