Convert MKV to MP4 — Free Online Tool
Convert MKV files to MP4 using H.264 video and AAC audio — the most universally compatible codec pairing for web playback, mobile devices, and streaming platforms. Because MKV and MP4 both support H.264, the video stream is re-encoded at CRF 23, and the +faststart flag moves the MP4 index to the front of the file for instant browser and mobile playback.
to
FFmpeg Command
Copy this command to run the same conversion locally with FFmpeg on your desktop. Download FFmpeg
Drop your MKV file here
or click to browse
Free — no uploads, no signups. Your files never leave your browser.
Settings
Note: Browser-based encoding uses approximate quality targets. For precise CRF compression, copy the FFmpeg command above and run it on your desktop.
Estimated output:
Conversion Complete!
DownloadHow It Works
MKV is a flexible open container that can hold virtually any codec, while MP4 is a more constrained container optimized for broad compatibility and streaming. This conversion re-encodes the video using libx264 at CRF 23 (a perceptually high-quality setting) and transcodes the audio to AAC at 128k bitrate — the default audio codec for MP4 and the one expected by platforms like YouTube, Instagram, and Apple devices. The -movflags +faststart flag restructures the MP4 file so its metadata index (the 'moov' atom) appears at the beginning of the file rather than the end, which allows video players and browsers to begin playback before the entire file has downloaded. Subtitle tracks embedded in the MKV are carried over as subtitle tracks in the MP4 output.
What Each Flag Does
| Flag | What it does |
|---|---|
ffmpeg
|
Invokes the FFmpeg binary. This is the open-source multimedia processing engine that powers both this browser-based tool (via WebAssembly) and the desktop command you can run locally. |
-i input.mkv
|
Specifies the input file as an MKV (Matroska) container. FFmpeg reads the container and automatically detects the video, audio, and subtitle streams inside — which could be any combination of codecs that MKV supports. |
-c:v libx264
|
Re-encodes the video stream using the libx264 encoder, producing H.264 video that is compatible with virtually every device, browser, and platform that supports MP4 playback. |
-c:a aac
|
Transcodes the audio stream to AAC, the standard audio codec for MP4 files and the format required by platforms like YouTube, Apple devices, and HTML5 video players. If the source MKV contains FLAC, MP3, Opus, or Vorbis audio, this flag converts it to AAC. |
-crf 23
|
Sets the Constant Rate Factor for the H.264 encoder to 23, which is the libx264 default and represents a good balance between visual quality and file size. The scale runs from 0 (lossless) to 51 (very low quality); values between 18 and 28 are typical for distribution. |
-b:a 128k
|
Sets the AAC audio bitrate to 128 kilobits per second, which is the standard quality tier for stereo audio and sufficient for most speech and music content in video files. |
-movflags +faststart
|
Moves the MP4 metadata index (moov atom) to the beginning of the output file after encoding completes. This is essential for web streaming and mobile playback — without it, players must download the entire file before they can start playing it. |
output.mp4
|
Specifies the output filename with the .mp4 extension. FFmpeg infers the MP4 container format from this extension and muxes the H.264 video and AAC audio streams into a standards-compliant MPEG-4 Part 14 file. |
Common Use Cases
- Uploading a locally downloaded or recorded MKV video to YouTube, Instagram Reels, or TikTok, which require MP4 with H.264 and AAC
- Making a video file playable in Safari or on iPhone/iPad, which do not natively support the MKV container regardless of the underlying codec
- Preparing a video for embedding directly in a website using an HTML5 <video> tag, where MP4/H.264 is the baseline-compatible format
- Sharing a video with a colleague or client whose Windows or macOS media player doesn't open MKV files without additional codec packs installed
- Converting a Handbrake or OBS Studio MKV recording to MP4 for editing in software like iMovie or Adobe Premiere, which handle MP4 more reliably than MKV
- Optimizing a video file for progressive download or CDN delivery, where the +faststart MP4 structure enables immediate playback without full buffering
Frequently Asked Questions
Yes, there is a small quality loss because this conversion re-encodes the video through libx264 rather than simply remuxing the stream. The default CRF 23 setting is widely considered a good balance between file size and quality — most viewers won't notice the difference from the original. If your MKV already uses H.264 video and you want zero quality loss, you could use -c:v copy in the FFmpeg command to remux without re-encoding, though our tool uses CRF 23 re-encoding by default to ensure broad compatibility.
File size depends heavily on what codec and bitrate the original MKV used. If the source MKV used a more efficient codec like HEVC (H.265) or VP9, re-encoding it to H.264 at CRF 23 will likely produce a larger MP4. Conversely, if the original MKV had a very high bitrate H.264 stream, CRF 23 may compress it more aggressively and produce a smaller file. The AAC audio transcoding at 128k typically has minimal size impact.
Subtitle tracks supported by the MP4 container (such as MOV_TEXT/tx3g format) are carried over. However, MKV commonly stores subtitles as ASS, SSA, or SRT-style text tracks, and these may require conversion to a compatible MP4 subtitle format — some subtitle types may be dropped if they are incompatible with the MP4 container. Multiple audio tracks are supported by MP4 and are generally preserved in the output.
By default, FFmpeg writes the MP4 metadata index (called the 'moov' atom) at the end of the file, which means a video player must download the entire file before it can start playing. The +faststart flag moves this index to the beginning of the file in a second pass, enabling progressive playback and instant streaming. This is essential for videos hosted on websites, shared via link, or uploaded to platforms — without it, viewers may see a long loading spinner before playback begins.
To adjust video quality, change the -crf value: lower numbers mean higher quality and larger files (e.g., -crf 18 for near-lossless), while higher numbers mean smaller files with more compression (e.g., -crf 28 for smaller size). For audio, replace -b:a 128k with a higher value like -b:a 192k or -b:a 320k for better audio fidelity. For example: ffmpeg -i input.mkv -c:v libx264 -c:a aac -crf 18 -b:a 192k -movflags +faststart output.mp4
Yes. On Linux or macOS, you can run: for f in *.mkv; do ffmpeg -i "$f" -c:v libx264 -c:a aac -crf 23 -b:a 128k -movflags +faststart "${f%.mkv}.mp4"; done — this loops over every MKV in the current directory and outputs a matching MP4. On Windows Command Prompt, use: for %f in (*.mkv) do ffmpeg -i "%f" -c:v libx264 -c:a aac -crf 23 -b:a 128k -movflags +faststart "%~nf.mp4". The browser-based tool processes one file at a time, so the FFmpeg command is especially useful for batch jobs.
Technical Notes
Both MKV and MP4 support H.264 (libx264) and AAC, which makes this a common and well-supported conversion path. The main technical consideration is that MKV is a more permissive container — it can hold VP9, HEVC, FLAC audio, PNG video, and complex subtitle formats like ASS/SSA that have no direct MP4 equivalent. When the source MKV contains HEVC or VP9 video, this tool re-encodes to H.264, which trades the compression efficiency of those codecs for near-universal device compatibility. FLAC audio tracks in the source MKV will be transcoded to AAC, which is lossy — if preserving lossless audio is critical, consider keeping the MKV or using a lossless AAC profile. The MP4 container has a theoretical 4GB file size limit in some older implementations, but modern FFmpeg uses the 64-bit 'large file' MP4 variant automatically for files that require it. Chapter markers and metadata embedded in the MKV are generally preserved in the MP4 output.