Convert MP4 to MKV

Converting MP4 to MKV puts a video into the container home media servers are built around, and every audio track in the source comes with it. Read the second section before you start: this converter re-encodes the picture rather than copying it across, which is the opposite of what a dedicated remuxer does.

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

What MKV holds that an MP4 struggles with

Matroska has been an open container since 2002 and it was designed with almost no opinion about its contents. It will carry H.264, HEVC, AV1, VP9 and FLAC side by side, up to 127 audio tracks, soft subtitles and chapter marks, all in one file. MP4 is stricter: it was standardised as ISO/IEC 14496-14 for delivery, and it handles several of those things awkwardly or not at all.

That is why media libraries drift towards MKV. One file per film that already contains the second language, the commentary and the subtitle tracks is easier to shelve than a folder of companions, and Plex, Jellyfin, Kodi and VLC all read it without being asked twice.

The honest part: this MP4 to MKV conversion is not a remux

Because the two containers can hold the same H.264 stream, the obvious way to do this is to lift the streams out of the MP4 and write them into a Matroska box untouched. That takes seconds, costs nothing in quality, and is what MKVToolNix — the standard desktop tool for exactly this — does.

This converter does not do that. It decodes the video and encodes it again, which means one generation of quality is spent and a long file takes real time. It is stated here in the second section rather than in a footnote because it changes the recommendation: if the file is a film you intend to keep, remux it properly with MKVToolNix and use this for the cases where a re-encode was going to happen anyway.

Every soundtrack in the MP4 arrives in the MKV

This is the part that goes the other way, and it is worth knowing because most converters quietly drop it. All audio tracks are carried, not just the first: an MP4 holding an English track, a German dub and a director’s commentary produces an MKV holding all three, in the same order, each still selectable in the player.

It is the exception on this site rather than the rule. Pulling the same MP4 into an MP3, an AAC or a FLAC keeps only the first soundtrack, because those formats have room for exactly one. Matroska has room for 127, so nothing has to be thrown away.

Subtitles and chapters are the thing MKV is famous for, and they do not survive

Matroska’s reputation rests on soft subtitles and chapter marks — text tracks you can switch on and off rather than burn into the picture. This conversion reads the video and audio tracks and nothing else, so an MP4 carrying embedded subtitles produces an MKV carrying none, and chapter marks are lost in the same silence.

Two workable answers. Keep a sidecar SRT file beside the MKV with the same base name, which every media server picks up automatically and which is easier to correct later than an embedded track. Or do the whole job in MKVToolNix, which can mux the video, the audio and the subtitle tracks together in one pass without touching a single frame.

HEVC and AV1 sources come out of this as H.264

The codec inside the MKV is chosen, not inherited. Whatever the MP4 held, the output is H.264 at High profile with AAC audio — the combination that every media player and every hardware decoder made in the last twenty years handles without help.

For an ordinary H.264 MP4 that is a like-for-like re-encode and the size lands close to where it started. For a 4K HEVC file it is usually a bad trade: H.264 needs more bits than HEVC for the same picture, so the MKV comes out larger while carrying slightly less detail. A modern HEVC file bound for a modern player is one to leave alone.

The two settings that matter before an MKV goes on a shelf

Quality has three bands and defaults to balanced. Since the video is being encoded anyway, the high band is worth its size for anything you intend to keep, because this is the copy everything downstream will be made from. The small setting is for a file you are about to watch once on a phone.

Resolution only ever goes down. Asking for more than the source has is ignored, deliberately — upscaling invents nothing and produces a bigger file with no new detail in it. Reducing a 4K capture to 1080p once, here, is better than asking a media server to scale every frame on every playback.

Where an MKV file will refuse to go

No browser plays Matroska. That is not a gap that is about to close and it is the single practical reason to keep an MP4 around: a file you might want to put on a web page, send through a messaging app, or open on somebody else’s phone should stay an MP4. Apple’s own players are the other reliable refusal.

Matroska is also not built for progressive streaming the way MP4 is, so it is a poor choice for anything served over HTTP to a player that starts before the download finishes. Inside a home network, with a server that transcodes on the fly, none of that matters — which is exactly the situation this conversion exists for.

How long an MP4 to MKV re-encode takes in a browser tab

The work runs on your own machine through the hardware encoder the operating system already uses, so a short clip is quick and a long one is proportional. There is no queue and no upload waiting to happen first, which on any hosted converter is normally the slow part of the whole exercise.

The free tier accepts files up to 100 MB. That is enough for episodes, clips and recordings and is not enough for a feature film, and there is no point pretending otherwise — a library-scale job belongs in a desktop tool that can remux a hundred files overnight without decoding a frame.

The film never leaves your machine to become an MKV

The conversion happens inside the browser tab, on your processor, using the decoders your computer already has for playing video. Nothing carrying the file is sent anywhere, which you can confirm by opening the network tab and converting something.

For this pair that is more practical than principled. The files are large, the alternative involves sending several hundred megabytes to a stranger’s server and waiting for it to come back, and the finished MKV is going onto a machine two metres away. Moving it across the internet twice to get there was never a sensible route.

How to put an MP4 into an MKV container

  1. Decide first whether you want a remux — if nothing should be re-encoded, use MKVToolNix instead.
  2. Drop the MP4 onto this page and raise the quality if the MKV is one you intend to keep.
  3. Download the MKV. Every audio track comes with it; subtitles and chapters do not.

MP4 and MKV: two boxes with very different rules about what fits

MP4 compared with MKV
MP4MKV
Full nameMPEG-4 VideoMatroska Video
File extension.mp4.mkv
Media typevideo/mp4video/x-matroska
CompressionLossy — file size is bought with qualityLossy — file size is bought with quality
First published20012002
Published byMPEG
SpecificationISO/IEC 14496-14Matroska
LicensingOpen standardOpen standard
Standing todayCurrentCurrent
Opens in a browserEvery browserSome browsers
Considered insteadWebM, MOVWebM

Opening the result

Only some browsers read MKV. It is the less portable of the two, so it is worth being sure the program at the other end accepts it before sending one.

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

MP4 can be played while it is still arriving; MKV expects the whole file first. That is the difference between a video that starts on a web page and one that has to finish downloading.

VLC and HandBrake read both MP4 and MKV, 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.

MKV dates from 2002, specified as Matroska. VLC, MKVToolNix and HandBrake all read it.

MP4 to MKV: tracks, codecs and what a media server sees

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.

Is this a remux, or is the video re-encoded?

It is re-encoded. Every frame is decoded and encoded again as H.264, which costs one generation of quality and takes real time on a long film. A true remux — the same stream copied into a new container in seconds — is what MKVToolNix does, and if that is what you need, that is the tool to use.

Do multiple audio tracks survive?

Yes. Matroska allows up to 127 audio tracks and this conversion carries every one it finds, so a film with an original language, a dub and a commentary arrives with all three. That is unusual here — extracting to MP3, AAC or FLAC keeps only the first, because those formats hold exactly one.

What about subtitles and chapters?

Neither is carried over. Matroska is famous for holding soft subtitles and chapter marks, and this conversion cannot put them there — the engine reads video and audio tracks only. Keep the original MP4, or keep a sidecar SRT next to the MKV, which every media server reads anyway.

My MP4 is HEVC. What codec does the MKV end up with?

H.264, at High profile. The target codec is fixed rather than inherited, so HEVC and AV1 sources are converted down to H.264. For a 4K HEVC file that usually means a noticeably larger MKV holding a slightly worse picture, which is a good reason to leave that particular file alone.

Will the MKV play in a browser?

No. No browser plays Matroska, which is the one thing MP4 does that MKV does not. That is fine for a media server, which decodes locally, and a problem the moment you want to drop the file into a web page or share a link to it.

How big a file can I convert?

Up to 100 MB on the free tier, and the work happens in your own browser rather than on a server, so a batch of files costs no upload time. A full-length film is normally past that ceiling, which is another argument for a desktop remuxer on a library-sized job.

More about these formats