Convert MKV to WebM

Converting MKV to WebM moves a video from the container that holds anything into the restricted one browsers are built to play. WebM is Matroska with the codec list cut down to VP9 and Opus, so the result plays inline in a `<video>` element where the MKV would have to be downloaded — and if your MKV came out of a download tool, it is probably carrying those codecs already.

  • Where it runs In your browser. The file is never uploaded.
  • Lossy Some detail is traded for size. WebM cannot hold everything an MKV 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.

WebM is Matroska with most of the choices taken away

This is the relationship worth understanding before converting anything. WebM is not a separate design; it is Matroska with the permitted contents cut down to a handful of codecs — VP8, VP9 and AV1 for video, Opus and Vorbis for audio. A WebM file is a legal Matroska file, and the parser reading it is the same parser.

The restriction is the entire value. A browser handed an arbitrary MKV cannot know whether it contains HEVC, DTS, TrueHD or something from 2004, so it declines the whole class rather than failing halfway through playback. A browser handed a WebM knows in advance that it is one of five things it can decode. Converting is therefore less about changing the file than about making a promise the browser is willing to accept.

Why your download tool wrote an MKV rather than an MP4

Video sites serve their best streams as VP9 or AV1 with Opus audio, and none of those belong in an MP4 that anything will play. So a download tool that merges the separate video and audio streams has to put them somewhere permissive, and Matroska is the container that accepts every combination without argument. That is why the file on your disk is an MKV even though nothing about it is a film.

The consequence is unusual for this bundle: the codecs you want in the WebM are, more often than not, already sitting inside the MKV. That makes the conversion cheap in one sense and worth thinking about in another, because it is exactly the case where a copy would have been possible and this tool does not do one.

VP9 to VP9 is still a re-encode, and it still costs something

It would be reasonable to assume that a VP9 track going into a WebM is copied across untouched. It is not. Every frame is decoded back to pixels and compressed again, and a second pass through a lossy codec always loses a little more of what the first pass approximated. On a screen recording or a talking head this is genuinely hard to see; on grain, water or fast panning it is visible if you compare.

It is worth being blunt about the alternative, because for this particular file it is a good one. If MediaInfo says your MKV already holds VP9 and Opus, ffmpeg with a stream copy, or MKVToolNix, will produce the WebM in seconds with nothing lost at all. Use this page when the source is something else, when the file needs resizing anyway, or when installing a desktop tool is not worth it for one clip.

What ends up inside the WebM, and what a browser needs

The output holds VP9 video and Opus audio, every time. An AV1 source is converted down rather than kept, which is a small loss of efficiency in exchange for a wider set of machines that can decode it. `vp09.00.31.08` is the string the browser is asked about before the conversion starts; it describes a 1280×720 probe, not the file you get, because the level digits are derived from the frame size — 40 for 1080p, 50 for 4K.

Current Chrome, Edge, Firefox and Safari all play that combination. Older Safari on older macOS is the exception that keeps MP4 in the picture, which is why a production `<video>` element normally lists both sources and lets the browser choose the first one it understands. Serving only WebM is a decision about which visitors you are willing to lose.

Extra soundtracks survive, subtitle tracks do not

WebM inherits Matroska’s room for multiple audio tracks, and every one the browser can decode is carried into the output in the order it was found. In practice a downloaded clip has one, so this matters less here than it does on the MP4 and MOV pages — but nothing is thrown away to make the file smaller.

Subtitle tracks are a different story and the story is short: this converter reads video and audio tracks only, so a soft-subbed MKV is invisible to it in that respect. For a page you control, that is not much of a loss. A WebVTT file referenced from a `<track>` element inside your `<video>` gives you captions the browser can style, a search engine can read and a visitor can copy, which an embedded track never does.

The soundtrack a browser cannot decode, and the silent WebM

The browser is asked whether it can decode each soundtrack before anything is converted. If it cannot, the track is dropped and the picture carries on, so the conversion succeeds and the WebM has no sound. Nothing warns you while it is happening.

A downloaded MKV carries Opus or AAC and is never affected. An MKV taken off a DVD or a Blu-ray carries AC-3, E-AC-3, DTS or Dolby TrueHD, and those are the codecs no browser ships a decoder for. If you are converting disc material for a page, play the WebM before you publish it — a silent hero video is the sort of thing nobody notices until a visitor mentions it.

Resolution is the setting that decides your page weight

For anything embedded on a page, the resolution control matters more than the quality band. A 4K source dropped to 1080p removes three quarters of the pixels and takes most of the bytes with it, and for a clip that will be displayed in a 700-pixel-wide column, every pixel above that is downloaded and thrown away by the browser on arrival.

The control only ever reduces. Asking for more than the source has is ignored deliberately, because upscaling invents no detail and produces a larger file for nothing. If the clip is decorative — a background loop, an autoplaying demo — 720p at the small quality band is usually indistinguishable in place and a fraction of the transfer.

The clip is encoded on your machine, not on ours

The decoding and the VP9 encoding both happen inside the browser tab. Nothing carrying the video is sent anywhere, which you can confirm by opening the network tab and converting something. There is no account and no queue behind anyone else’s upload.

VP9 asks more of the processor than H.264 does, and hardware VP9 encoders are less commonly fitted, so the browser sometimes falls back to software and the wait is longer than you would expect for the file size. That cost is bought back on every page load afterwards: for the same visible quality VP9 typically needs meaningfully fewer bytes than H.264, and a video is usually served far more often than it is encoded.

How to convert an MKV file into a WebM

  1. Drop the MKV onto this page, or click to choose one.
  2. Set the resolution to the size the video will actually be displayed at, then convert — the picture is re-encoded as VP9 and the sound as Opus.
  3. Download the WebM and reference it from a `<video>` element, ideally with an MP4 source alongside it.

MKV and WebM: one container, two different sets of rules

MKV compared with WebM
MKVWebM
Full nameMatroska VideoWebM Video
File extension.mkv.webm
Media typevideo/x-matroskavideo/webm
CompressionLossy — file size is bought with qualityLossy — file size is bought with quality
First published20022010
Published byGoogle
SpecificationMatroska
LicensingOpen standardOpen standard
Standing todayCurrentCurrent
Opens in a browserSome browsersEvery browser
Considered insteadMP4MP4

Opening the result

WebM opens in every current browser. MKV has narrower browser support than that. If the file is going onto a web page or into a form, that is usually the whole reason for the conversion.

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 MKV and WebM, so there is a way to check the result against the original without a second tool.

What each format is for

The two are aimed at different work: MKV at archiving and handing a finished file over, WebM at the web and streaming. That is worth weighing before converting, because the reason one exists is usually the reason the other is awkward.

MKV was published in 2002. The specification is Matroska, 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.

MKV to WebM: codecs, browsers and what a page can play

Are my MKV 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.

My MKV already holds VP9 and Opus. Is this just a rewrap?

No, and that is the most useful thing on this page. The video is decoded and encoded again even when the source and target codec are the same, so VP9 to VP9 costs a real generation of quality rather than nothing. A true rewrap — the same packets lifted into a new container in seconds — is what MKVToolNix or ffmpeg with stream copy does, and if your streams are already VP9 and Opus that is the better tool.

What codecs does the WebM end up holding?

VP9 for the picture and Opus for the sound, always. WebM is defined as a restricted subset of Matroska, and that restriction is the point: a browser knows in advance that any WebM it is handed is one of a small set of codecs it can decode. An AV1 source is converted down to VP9 here rather than kept.

Will every browser play the result?

VP9 and Opus in WebM are read by current versions of Chrome, Edge, Firefox and Safari. Older Safari on older macOS is the reliable exception, which is why a `

Does the WebM keep the transparency in my file?

Only if this conversion has an alpha channel to keep, and a Matroska file from a download tool or a disc does not have one. VP9 in WebM can carry alpha and it is how transparent overlays are delivered on the web, but nothing in this path creates one where the source had none.

What happens to the second audio track and the subtitles?

Extra audio tracks are carried — WebM inherits Matroska’s room for many of them. Subtitle tracks are not, and not because they are refused: this converter reads video and audio tracks only, so soft subtitles are invisible to it. For a page you control, a WebVTT file referenced from a `` element is the better answer anyway, because it is searchable and stylable.

Why is VP9 encoding slower than H.264?

Because it does more work per frame, and because hardware VP9 encoders are less widely fitted than H.264 ones, so the browser more often falls back to a software path. The trade is real: for the same visible quality VP9 typically needs meaningfully fewer bytes than H.264, which is what you are buying with the wait.

More about these formats