On-device AI — professional-grade, fully private.

Video

How to Convert MP4 to WebM for Your Website (VP9, Quality and Fallback)

Turn an MP4 into a WebM for your website. Steps, what VP9 and VP8 mean, quality and size to expect, the HTML video tag with an MP4 fallback, and the limits.

Updated November 7, 20267 min read

To convert an MP4 to WebM, open the MP4 to WebM converter, add the file, leave the settings on their defaults and press Convert to WebM. The new file uses VP9 video, an open codec that browsers play without a licence fee, and it is often a good deal lighter than the MP4 it came from. It runs on your device, not our servers, and the free plan covers one video up to 100 MB and 5 minutes. This guide explains why web developers want WebM, how to write the HTML so every visitor still gets a video, what size and quality to expect, and what the tool cannot do.

Why web developers ask for WebM

WebM is a video format designed for the web. It is open, so nobody charges a licence to use it, and it is built on codecs that were made to be small. The container holds the video and the sound, and the codec inside decides how efficiently the picture is stored. A WebM file normally carries VP9 or VP8 video and Opus audio.

For a page you control, the appeal is weight. A background loop, a product demo or a looping animation is downloaded by every visitor, so a lighter file means a faster page and less bandwidth. MP4 with H.264 is the safest format to hand to another person, but it is an older design and usually needs more data for the same picture. For the full comparison of formats, see MP4 vs MOV vs WebM.

What the converter writes

The tool re-encodes the picture as VP9, the newer of the two WebM video codecs. If the device you are using cannot set up a VP9 encoder, it falls back to VP8, which is older and plays almost everywhere WebM does. You do not choose between them; the page picks whichever your device can produce. The sound is re-encoded too, using an audio codec WebM allows, which in practice means Opus.

Part of the fileWhat you getWhy it matters
ContainerWebM (.webm)Opens in a browser tab or a video tag
VideoVP9, or VP8 as a fallbackOpen codecs with no licence fee
AudioRe-encoded for WebM, normally OpusSmall and clear at low bitrates
TransparencyNot addedAn MP4 has no see-through background to carry over

A note on transparency, because people search for it. WebM can in principle hold a video with a see-through background, but an ordinary MP4 has none, and this converter does not create one. If you need a clip with a transparent background, the video has to be made that way at the source.

Converting MP4 to WebM, step by step

1

Open the converter and add your file

Go to the MP4 to WebM converter and drop the .mp4 file onto the page, or press Browse files. The page checks the file straight away and tells you if it is too large, too long or not a video.

2

Check that Convert to says WebM

On this page the target is already WebM. The same engine sits behind the general video converter if you want a different pair.

3

Pick a Quality or a Preset

Quality has three steps: High, Medium and Low. A preset such as Web, Mobile, Social or Archival sets quality, resolution and encoding speed together. For a clip on your own site, the Web preset is a sensible start.

4

Choose Resolution and Frame rate if you need to

Resolution and Frame rate both default to Original. A hero video that appears small on the page does not need 1080p, so a smaller Resolution is often the best way to cut weight. Under Trim you can also enter a Start and End in seconds.

5

Press Convert to WebM, then download

A progress percentage and an estimate of the time left appear while it works. When it finishes, press Download WebM. Your original MP4 is not touched, so keep it for the fallback described below.

Free: one video at a time, up to 100 MB and 5 minutes, exported up to 720p. Pro: batches of 20 and no file size cap beyond what your device can handle. It runs on your device, not our servers.

Convert MP4 to WebM

The HTML: WebM first, MP4 as the fallback

A video element can list several sources, and the browser plays the first one it understands. Put the WebM first so most visitors get the lighter file, and the MP4 second so nobody is left with an empty box. This is the whole example:

  • <video controls width="640" poster="poster.jpg">
  • <source src="clip.webm" type="video/webm">
  • <source src="clip.mp4" type="video/mp4">
  • </video>

Two details matter. The type attribute lets the browser skip a file it cannot play without downloading it first. And the order is what gives you the saving: the browser stops at the first source it supports. For a silent background loop, add autoplay muted loop playsinline to the video tag, which is also what stops phones from opening it in full screen. The same trick is covered for animations in converting a GIF to MP4.

Quality and file size: what to expect

Converting between two lossy formats means decoding and re-encoding the picture, so a small amount of detail is lost. The converter sets the video bitrate relative to what your MP4 actually uses, and never spends more than the source contains. High keeps about 90 percent of the source bitrate, Medium about 70 percent and Low about 45 percent. Because VP9 is efficient, the picture usually looks close to the MP4 at those figures.

SettingBest forWhat to know
Quality: HighProduct demos, text on screenLargest WebM; closest to the MP4
Quality: MediumMost website videoA good balance of size and detail
Quality: LowBackground loops, thumbnails that moveSoftness shows on text and fine detail
Resolution: smallerVideos shown small on the pageThe biggest single saving
Frame rate: lowerSlow, calm footageSmaller file, but fast motion looks choppier

Do not expect a miracle on every file. An MP4 that was already compressed hard has little left to give, and the WebM may come out about the same size or only slightly smaller. The savings are largest when the MP4 was exported generously, for example straight from an editor. If the WebM is still too heavy, lower Resolution one step or run the file through the video compressor first.

Free limits and when Pro helps

The free plan converts one video at a time, up to 100 MB and 5 minutes long. Exports go up to 720p on the short side: a larger video is scaled down automatically, and a smaller one keeps its own size. If your file is over the limit, the page says so and offers a shortcut to the compressor. You can also cut it down with the video trimmer or resize it first. Pro queues up to 20 videos in one run with a single ZIP download and removes the size cap, leaving only what your device can handle.

Because the work happens on your device, a long or large video can take a while on an older phone or laptop. Keep the tab open until the download button appears.

When it does not work

  • The page says it cannot decode the video. The MP4 may use a codec your current browser cannot read, such as some HEVC files. Try a recent Chrome, Edge or Safari, or convert the file to standard H.264 first.
  • The WebM plays in Chrome but not on an iPhone. Older versions of Safari had weak WebM support. That is exactly why the MP4 fallback line is in the HTML.
  • The WebM is bigger than the MP4. The source was already tightly compressed. Choose Quality Medium or Low, or a smaller Resolution.
  • There is no sound. Check that the original MP4 had sound. A silent source gives a silent WebM.
  • It stops partway through a long file. Trim the video into shorter parts, or use Pro for larger files.

Going the other way, for example when a download turns out to be a WebM that your editor will not open, is covered in converting WebM to MP4.

Frequently asked questions

How do I convert MP4 to WebM for free?

Open the MP4 to WebM converter, add the file and press Convert to WebM. Free covers one video at a time, up to 100 MB and 5 minutes, exported up to 720p. It runs on your device, not our servers.

Which codecs does the WebM use?

The video is encoded as VP9, with VP8 as a fallback if your device cannot produce VP9. The sound is re-encoded for the WebM container, normally as Opus.

Is WebM better than MP4 for a website?

Often it is lighter for the same picture, and it is an open format. It is not universal, so list the WebM first in the video tag and the MP4 second as a fallback.

Can I convert MP4 to WebM without losing quality?

Both formats are lossy, so a tiny loss is unavoidable when the picture is re-encoded. At High quality with Resolution and Frame rate on Original, it is very hard to see.

Can the WebM have a transparent background?

No. The converter does not add transparency, and an ordinary MP4 has none to carry over. A clip with a see-through background has to be created that way from the start.

Why is my WebM not smaller than the MP4?

If the MP4 was already compressed hard, there is little to save. Lower the Quality one step or choose a smaller Resolution, which is the biggest saving for video shown small on a page.

Keep reading

More in Video →