MP4 to WebM

Convert MP4 videos to WebM (VP8 and Opus) for the web, with the quality you choose.

loading MP4 to WebM
About this tool

How do I convert MP4 to WebM?

WebM is an open video format made for the web. Converting MP4 to WebM is the usual step when you want to embed a video in a page with the HTML video element, upload to a platform or wiki that asks for open formats, or give a web project a second source besides MP4. This tool does it in your browser: choose a quality, convert, and download a .webm with VP8 video and Opus audio.

A WebM is a Matroska-based container that holds a video track and an audio track. In this tool the video is VP8 and the audio is Opus at 128 kbit/s. VP8 is the codec that runs reliably in the WebAssembly build of FFmpeg used here; the newer VP9 encoder of that build runs out of memory on common inputs, so it is not used. VP8 plays in Chrome, Firefox and Edge and in current versions of Safari; very old browsers and some TVs may not.

Everything happens on your device. FFmpeg compiled to WebAssembly runs in a worker; the engine is about 32 MB, downloads from this site once and stays in your cache. The MP4 is never uploaded: no server, no account, no watermark. Encoding VP8 on a single browser thread is slower than H.264, so a long video takes a while; the bar shows the real time left and you can cancel.

MP4 or WebM?

MP4 with H.264 is the format that plays everywhere: phones, TVs, editors, messaging apps. WebM is royalty-free, but support in devices and editors is narrower. If someone just needs to watch the video, keep the MP4. Convert to WebM when a web page or platform specifically asks for it, or to offer it next to the MP4.

VP8, VP9 and AV1

VP9 is more efficient than VP8 and AV1 more than VP9, at the cost of far slower encoding. Because this tool uses VP8, do not expect the smallest possible WebM from it; for an equal-quality video, a VP8 WebM is not necessarily smaller than the H.264 MP4. Its point is compatibility with the open web format, not maximum compression.

How to convert MP4 to WebM

  1. Drop one or more MP4 files on the page, or pick them with the button. MP4 and M4V are accepted. An example clip is loaded first so you can try the settings.
  2. Choose the Quality: Smallest file (CRF 42), Balanced (CRF 34, default) or High quality (CRF 28). In every case the video bitrate target is capped at 4 Mbit/s.
  3. Click Convert to WebM. The first time, the engine downloads before the work starts.
  4. Wait with the tab open. The bar shows elapsed and remaining time and you can Cancel.
  5. Download each .webm or Download all as ZIP. The same name is kept with the new extension.
  6. For a smaller file or a shorter clip, continue with Compress video or Trim video.

Examples

Short product demo for a landing page

demo.mp4, 1280 × 720, 12 seconds, no important sound. Convert with Balanced, then place both files so browsers choose:

<video controls muted playsinline>
  <source src="demo.webm" type="video/webm">
  <source src="demo.mp4" type="video/mp4">
</video>

Browsers use the first source they can play, so the MP4 acts as a safety net.

Clip for a wiki or open-content site

tutorial.mp4, 3 minutes. Some open-content platforms prefer open formats such as WebM over MP4, so this is the conversion to do before uploading; check the rules of the site. Use High quality so editors can reuse it.

Bitrate check

The encoder aims at constant quality with a ceiling of 4 Mbit/s. As an order of magnitude, a 60-second clip at that ceiling is 4,000,000 / 8 × 60 = 30 MB of video, plus audio at 128 kbit/s, which adds about 1 MB (960 KB). Simple scenes land well below it.

Game or app asset

intro.mp4, 8 seconds. Some game engines and web frameworks load WebM for their video textures. Convert, test, and keep the MP4 if a target device refuses the WebM.

Common errors and how to fix them

  • "The media engine could not process this file." The file may be damaged or hold a codec the engine does not read. Check it in a player, then try Video converter.
  • "The browser ran out of memory." The video is kept in memory while it is converted. Convert one file at a time and close other tabs.
  • "is not a supported file for this tool." This page takes MP4 and M4V. For a MOV use MOV to MP4 first.
  • The WebM does not play in an editor or on a TV. Not every program reads WebM. Keep the MP4 for those.
  • It is slow. VP8 encoding on one thread takes time, often more than the length of the video for HD. Keep the tab open.
  • The engine download fails. Click Try again; what already arrived is kept.

Frequently asked questions

Is WebM better than MP4?

Not in general. WebM is open and good for the web; MP4 plays on more devices. Choose by where the file will be used.

Does converting MP4 to WebM lose quality?

Yes, a little: it re-encodes the picture and audio. High quality (CRF 28) keeps the loss low; Smallest file (CRF 42) shows it.

Is my video uploaded to a server?

No. The conversion runs in your browser; the file stays on your device.

Does WebM work on iPhone?

Recent versions of Safari play WebM, but older iOS versions do not. For iPhones in general, MP4 is still the safer choice.

Can I convert WebM back to MP4?

Yes, with WebM to MP4.

Report a problem