Convert MP4 to WebM

Converting MP4 to WebM re-encodes the video as VP9 with Opus audio, which is what browsers are happiest serving and usually smaller on the wire than the H.264 inside the MP4. It is the slow conversion in this group, and the quality setting is the one that genuinely matters.

  • Where it runs In your browser. The file is never uploaded.
  • Lossy Some detail is traded for size. WebM cannot hold everything an MP4 can.
  • File size limit Up to 100 MB per file, free, without an account.
  • Worth knowing Video is re-encoded rather than copied, so some detail is lost even at the highest setting. Subtitle tracks and chapters are not carried over. Where the soundtrack is a format the browser cannot decode — AC-3, E-AC-3, DTS and TrueHD, common on disc and streaming rips — the picture converts and the result is silent.

Up to 100 files at once. Mixed formats are fine.

Why MP4 to WebM is a real conversion and not a rewrap

Most container changes are cosmetic: the same H.264 stream inside a different box. This one cannot be. WebM was defined by Google in 2010 around a specific pair of codecs, and the file this page produces holds VP9 video with Opus audio. The MP4 almost certainly held H.264 with AAC. Nothing is shared, so every frame is decoded and encoded again from scratch.

That is the whole reason this page exists separately from the other container conversions. It is slower than all of them by a wide margin, the settings change the result in ways you can see, and the thing you get in return is a smaller file for the same picture — which only matters if the file is going over a network to somebody else.

The bytes-per-second argument for putting WebM on a page

VP9 is a generation newer than H.264 and spends fewer bits reaching the same visible quality. For a hero video or a looping background — the two places video actually hurts a page — that difference lands directly on how long a visitor stares at nothing.

It is not guaranteed. Re-encoding an already-compressed MP4 means the VP9 encoder is faithfully reproducing H.264’s artefacts alongside the picture, and on a short clip that has already been squeezed hard the WebM can come out no smaller at all. Look at both file sizes before committing. A conversion that made the file bigger is a conversion to undo.

Serve the WebM and the MP4 together

The `<video>` element takes more than one `<source>` child and the browser uses the first one it can play. Listing the WebM first and the original MP4 second means modern browsers take the smaller file and anything unusual falls back without a single line of JavaScript. Only one of the two is ever downloaded.

Keep the MP4 rather than deleting it once the WebM exists. It costs storage and nothing else, it is the file to hand to someone who asks for a download, and it is the one that will still open in a video editor in ten years. WebM is a delivery format; treating it as your only copy is how a project loses its master.

Choosing a quality band when the WebM is going over a network

The three bands map to bitrate targets that the encoder resolves per codec, and balanced is the default. For a muted background loop the small setting is usually right: nobody is watching it closely, it is competing with everything else on the page for bandwidth, and the difference is invisible at the size it plays.

For anything with a face in it, or text, or fine detail somebody is meant to read, balanced is the floor. The high band belongs to files that will be edited or encoded again later, where you are protecting the next generation rather than this one — spending it on a delivery file mostly buys bytes nobody notices.

Resolution is the biggest saving available and it is a separate control

A smaller frame needs fewer bits to look the same, and the relationship is not gentle: halving the width and height quarters the pixel count. If the video is displayed in a 800-pixel-wide column, serving 4K to it is spending bandwidth on detail the layout throws away before anyone sees it.

The resolution control only goes down. Asking for a size larger than the source has is ignored rather than honoured, because upscaling produces a bigger file containing exactly the detail that was already there. Set it once here rather than letting the browser scale on every playback.

What the Opus track does to the audio

The sound is re-encoded as Opus, which is the audio half of what WebM is for and is genuinely better than AAC at low bitrates — it is what browsers use for voice calls for that reason. On speech at small sizes the difference is audible in Opus’s favour.

The unavoidable cost is that this is a second round of lossy compression on audio the MP4 had already compressed once. For a background loop with no sound, or a demo with a voiceover, this is academic. For a music video where the audio is the point, extract the sound separately from the original at high quality rather than accepting whatever the delivery encode leaves.

WebM cannot carry the transparency people expect from it

WebM is one of the few video formats with an alpha channel, and that reputation causes a specific disappointment here: an MP4 has no alpha to hand over, and any alpha side data present in the stream is discarded during the conversion. A transparent WebM has to be authored from a source that actually holds transparency.

If the goal is a video that sits over a page background without a visible box, the usual answers are a matching solid background colour baked into the video, or a CSS blend mode over an opaque clip. Both are less fragile than alpha video, which several browsers still handle inconsistently.

When the browser refuses to make a WebM

The conversion asks whether this browser can encode VP9 before it reads a single byte, and if the answer is no it says so and names browsers that can. That check exists so the failure arrives immediately rather than after several minutes of work, phrased as though the file were at fault.

There is deliberately no software fallback. A VP9 encoder compiled to WebAssembly is tens of megabytes to download and roughly an order of magnitude slower than the hardware encoder already present on the machine, and offering that quietly would turn a clear refusal into a conversion that appears to hang.

The encode runs on your machine, which is why there is no watermark

Video encoding is minutes of processor time, and that is precisely why hosted converters put a watermark on the output, cap the length, or ask for an account: somebody has to pay for those minutes. Here they are yours, so none of that applies and the MP4 is never uploaded.

The practical ceiling is 100 MB on the free tier and, past that, your own memory and patience. On a hosted converter the upload alone would usually take longer than this entire conversion does.

How to produce a WebM file from an MP4

  1. Drop the MP4 onto this page and pick a quality band — small for a muted loop, balanced for anything watched.
  2. The video is re-encoded as VP9 with Opus audio on your own machine. Expect it to take longer than other conversions.
  3. Download the WebM and serve it alongside the MP4 as a second `<source>`.

MP4 and WebM: the same picture through a newer codec

MP4 compared with WebM
MP4WebM
Full nameMPEG-4 VideoWebM Video
File extension.mp4.webm
Media typevideo/mp4video/webm
CompressionLossy — file size is bought with qualityLossy — file size is bought with quality
First published20012010
Published byMPEGGoogle
SpecificationISO/IEC 14496-14
LicensingOpen standardOpen standard
Standing todayCurrentCurrent
Opens in a browserEvery browserEvery browser
Considered insteadMKV, MOVMKV

Opening the result

WebM is a container rather than a single format. What actually plays is the codec inside it — usually VP8, VP9 and AV1 — which is why two files with the same extension can behave differently on the same device.

VLC reads both MP4 and WebM, so there is a way to check the result against the original without a second tool.

What each format is for

MP4 is MPEG's format, published in 2001. The specification is ISO/IEC 14496-14, and it is worth reading if the file has to outlive the tool that wrote it.

WebM comes from Google and dates from 2010. VLC and FFmpeg all read it.

MP4 to WebM: size, speed and browser support

Are my MP4 files uploaded anywhere?

No. This conversion runs entirely inside your browser, so the file never leaves your device. You can confirm it yourself: open the network tab of your browser's developer tools and convert something. You will see the page load, plus the analytics and advertising the site is paid for with — and nothing carrying your file. The engine behind this particular pair is mediabunny, a wrapper around WebCodecs, which borrows your device's own hardware decoders; your browser fetches it once and caches it.

Why does this take so much longer than converting to MOV or MKV?

Because it is a full change of codec rather than a change of wrapper. The MP4 holds H.264; the WebM holds VP9, which is a slower encoder by a wide margin and has no shortcut available. Everything else in the video group re-encodes to H.264, which the hardware does far more quickly.

Do I still need to serve an MP4 as well?

Serve both. A `

Will the WebM actually be smaller?

Usually, at the same visible quality, because VP9 is a generation ahead of H.264. It is not automatic: converting an already-compressed MP4 means the encoder is spending bits reproducing compression artefacts as well as the picture. Compare the two files rather than assuming, and if the WebM is larger, keep the MP4.

What quality setting should I use for a web page?

Balanced for anything with faces or detail people will look at. The small setting is right for a muted background loop, where nobody is watching closely and every kilobyte is on the critical path. The high setting is for a file that will be edited or re-encoded later, not for delivery.

Does the WebM keep transparency?

No. WebM can carry an alpha channel, but an MP4 has none to give it and any alpha side data is discarded during the conversion. A transparent video has to be authored that way from a source that holds it.

What happens if my browser cannot encode VP9?

The conversion refuses before it reads the file and tells you so, naming a browser that can. There is no software fallback on purpose: a VP9 encoder in WebAssembly is tens of megabytes and an order of magnitude slower than the hardware one sitting unused beside it.

Not sure which you need?

This page converts one into the other. If you are choosing rather than converting, MP4 vs WebM answers which to use, for what, and what each is bad at.

More about these formats