Convert MKV to ALAC — Free Online Tool
Convert MKV files to ALAC (Apple Lossless Audio Codec) — extracting the audio track from the Matroska container and re-encoding it into a lossless .m4a file compatible with Apple devices, iTunes, and Music.app. ALAC preserves every bit of audio detail while remaining natively playable across the Apple ecosystem.
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
This conversion strips the video and any subtitle tracks from the MKV container entirely, keeping only the audio. The audio stream — whether it was originally encoded as AAC, MP3, Opus, Vorbis, or FLAC inside the MKV — is decoded to raw PCM and then re-encoded using Apple's ALAC codec, wrapped in an MPEG-4 (.m4a) container. Because ALAC is lossless, the output is a mathematically perfect representation of the decoded audio signal. Note that if the source audio inside the MKV was already lossy (e.g., AAC or MP3), ALAC will preserve that decoded audio exactly, but the original lossy compression artifacts cannot be recovered — lossless encoding of a lossy source does not restore quality that was already discarded.
What Each Flag Does
| Flag | What it does |
|---|---|
ffmpeg
|
Invokes the FFmpeg tool. In this browser-based tool, FFmpeg runs locally via WebAssembly (FFmpeg.wasm) — your file never leaves your device. The same command works identically in a terminal on macOS, Windows, or Linux for files over 1GB. |
-i input.mkv
|
Specifies the input Matroska file. FFmpeg reads the MKV container and identifies all streams inside — video, audio, subtitles, and chapters — before processing begins. |
-c:a alac
|
Sets the audio codec to ALAC (Apple Lossless Audio Codec). FFmpeg will decode the source audio track from the MKV — regardless of whether it was AAC, MP3, Opus, Vorbis, or FLAC — and re-encode it using the lossless ALAC encoder. No bitrate or quality parameter is needed because ALAC compression is mathematically lossless. |
output.m4a
|
Defines the output file. The .m4a extension signals an MPEG-4 audio container, which is the standard wrapper for ALAC audio. FFmpeg infers the container format from this extension, ensuring the ALAC stream is packaged correctly for playback in Music.app, iTunes, QuickTime, and Apple devices. |
Common Use Cases
- Extracting high-quality audio from an MKV concert or live performance recording to build an Apple Music library with lossless playback on AirPods Pro or HomePod
- Archiving the audio track of an MKV film rip in ALAC so it can be imported into iTunes/Music.app and synced to an iPhone without transcoding penalties
- Converting a FLAC-audio MKV (a common format from lossless ripping tools) into ALAC for compatibility with Apple devices that do not natively support FLAC in all contexts
- Stripping the video from an MKV audiobook or lecture recording and saving the audio as a lossless ALAC file for long-term archival before any future format migrations
- Preparing audio from an MKV video project file for use in GarageBand or Logic Pro, which have native ALAC support and benefit from the lossless source during editing
- Converting MKV-packaged multi-episode content (where only the audio matters) to individual ALAC files that can be tagged and organized in Music.app
Frequently Asked Questions
It depends on the codec of the audio track inside your MKV. If the source audio is lossless (such as FLAC or PCM), the conversion to ALAC is also lossless — meaning no quality is lost whatsoever. If the source audio is lossy (such as AAC, MP3, Opus, or Vorbis), the decoded audio is captured perfectly by ALAC, but any quality loss from the original lossy encoding is already baked in and cannot be recovered. You are not making the audio worse by using ALAC, but you are also not restoring quality that was previously discarded.
ALAC is a codec, not a container. Apple stores ALAC-encoded audio inside the MPEG-4 container format, and the conventional file extension for this is .m4a — the same extension used for AAC audio. Both are MPEG-4 containers; the difference is the codec inside. Music.app, iTunes, QuickTime, and most Apple devices identify the codec correctly and play .m4a ALAC files as lossless audio.
Basic metadata tags (title, artist, album, etc.) that are present in the MKV are generally preserved and remapped into the MPEG-4 container's tagging structure. Chapter markers supported by ALAC's .m4a container may also be carried over, since ALAC does support chapters. However, MKV-specific metadata fields that have no equivalent in the MPEG-4 spec may be silently dropped. It is worth verifying chapter and tag accuracy in Music.app or a tag editor like MP3Tag after conversion.
The standard conversion extracts the first (default) audio track from the MKV and encodes it as ALAC. ALAC's .m4a container does not support multiple audio tracks in the way MKV does, so only one track can be included in the output. If your MKV contains multiple audio tracks — for example, different language dubs — you would need to run a separate conversion for each track, selecting the desired track using the '-map' flag in the FFmpeg command.
Use the '-map' flag to specify which audio stream to include. For example, to select the second audio track (index 1), add '-map 0:a:1' before the output filename: 'ffmpeg -i input.mkv -map 0:a:1 -c:a alac output.m4a'. You can identify which audio tracks are present in your MKV by running 'ffmpeg -i input.mkv' and reading the stream list in the output.
If the MKV's audio was stored as FLAC, the ALAC output will be similar in size — both are lossless formats with comparable compression ratios, typically 40–60% smaller than raw PCM. If the MKV's audio was lossy (AAC or MP3), the ALAC output will be considerably larger, because decoding a lossy stream and re-encoding it as lossless inflates the file to near-PCM size. This makes converting from a lossy MKV audio track to ALAC a poor choice if file size is a concern.
Technical Notes
The ALAC encoder in FFmpeg is mature and well-supported, producing files fully compatible with Apple's reference decoder. Because ALAC uses only integer arithmetic and supports bit depths of 16-bit and 24-bit at sample rates up to 384 kHz, it can faithfully represent high-resolution audio from MKV sources ripped from Blu-ray or other high-fidelity origins. One important limitation: the ALAC .m4a container does not support subtitle tracks, so any subtitle streams in the MKV (SRT, ASS, PGS, etc.) are discarded during conversion — if subtitle preservation matters, keep the original MKV. The ALAC format also does not support the kind of embedded cover art handling that MP3 or FLAC does in all software, though iTunes and Music.app can attach artwork after import. The FFmpeg command shown uses '-c:a alac' to specify the ALAC codec explicitly; no bitrate flag is needed or applicable because ALAC is lossless and its output size is determined by the audio content, not a quality setting.