MP4 to MKV Video Converter

Learn how to convert MP4 to MKV using free tools, generate ready-to-run FFmpeg commands, and inspect your video metadata instantly in the browser.

FFmpeg Command Generator

Configure your options and get a ready-to-run FFmpeg command.

Video File Inspector

Drop any video file to read its metadata — 100% client-side, nothing uploaded.

FFmpeg (Fastest — command line)

Free, cross-platform, lossless or re-encode

FFmpeg can rewrap MP4 to MKV in seconds without touching the video or audio streams. Use the command generator above for custom options, or copy these common examples:

# Lossless rewrap (fastest, no quality loss)
ffmpeg -i input.mp4 -c copy output.mkv
# Re-encode to H.265 for smaller file size
ffmpeg -i input.mp4 -c:v libx265 -crf 28 -c:a copy output.mkv
# Add an external SRT subtitle track
ffmpeg -i input.mp4 -i subs.srt -c copy -c:s srt output.mkv
# Batch convert all MP4 files in a folder (bash)
for f in *.mp4; do ffmpeg -i "$f" -c copy "${f%.mp4}.mkv"; done

Install on Mac: brew install ffmpeg — Windows: winget install ffmpeg or download from ffmpeg.org.

MKVToolNix (GUI — MKV specialist)

Free, Windows / Mac / Linux

MKVToolNix is purpose-built for creating and editing MKV files. Its MKVMerge GUI makes it easy to combine video, audio, and subtitle tracks.

  1. Download and install MKVToolNix from mkvtoolnix.download.
  2. Open MKVMerge GUI and click Add source files to add your MP4.
  3. Optionally add external subtitle files (.srt, .ass) using Add source files again.
  4. Set the output filename with a .mkv extension.
  5. Click Start multiplexing. The default mode is lossless — no re-encoding.

MKVToolNix also includes mkvmerge for command-line batch processing and mkvinfo for track inspection.

VLC Media Player (GUI — no command line)

Free, Windows / Mac / Linux

  1. Open VLC and go to Media → Convert / Save.
  2. Click Add and select your MP4 file, then click Convert / Save.
  3. In the Profile drop-down, click the wrench icon to edit a profile.
  4. Switch to the Encapsulation tab and select Matroska (MKV).
  5. Save the profile, set the destination file with a .mkv extension, and click Start.

VLC re-encodes by default. For a lossless rewrap, use FFmpeg or MKVToolNix instead.

HandBrake (GUI — quality re-encode)

Free, Windows / Mac / Linux

  1. Open HandBrake and drag your MP4 file onto the window.
  2. In the Summary tab, set Format to MKV.
  3. Choose a preset (e.g., H.265 MKV 1080p30) or configure video/audio settings manually.
  4. Set the output filename under Save As and click Start Encode.

HandBrake always re-encodes video. It is the best choice when you also want to resize, trim, or change quality. For a pure container rewrap, use FFmpeg or MKVToolNix.

Tool Comparison

Tool Lossless GUI Subtitles Batch
FFmpeg Yes CLI only Yes Yes
MKVToolNix Yes Yes Yes Yes
VLC No Yes Limited No
HandBrake No Yes Yes Yes
Copied!

Summary

Learn how to convert MP4 to MKV using free tools, generate ready-to-run FFmpeg commands, and inspect your video metadata instantly in the browser.

How it works

  1. Use the FFmpeg Command Generator to select your conversion options (codec, quality, subtitles).
  2. Copy the generated command and run it in your terminal.
  3. Optionally drop any video file into the File Inspector to read its metadata without uploading.
  4. For GUI users, follow the VLC, HandBrake, or MKVToolNix guides on the right.
  5. After conversion, drop the new MKV file into the inspector to verify codec and resolution.

Use cases

  • Archive video collections in MKV for long-term storage with multiple subtitle tracks.
  • Prepare MP4 files for Plex, Kodi, or Jellyfin media servers that prefer MKV.
  • Rewrap MP4 to MKV losslessly in seconds without re-encoding.
  • Attach SRT or ASS subtitle files into an MKV container.
  • Preserve multiple audio language tracks that MP4 containers sometimes drop.
  • Convert footage for editors and tools that handle MKV natively.
  • Inspect video codec, resolution, and duration before converting.
  • Generate the correct FFmpeg command without memorizing flags.

Frequently Asked Questions

Last updated: 2026-06-11 · Reviewed by Nham Vu