Convert M4A to FLAC — Free Online Tool
Convert M4A files (AAC-encoded audio from iTunes, podcasts, or Apple devices) to FLAC, a lossless open format that preserves every bit of audio data without quality loss. Since AAC is a lossy codec, this conversion re-encodes the decoded PCM stream into FLAC — no further quality is lost beyond what AAC originally discarded.
to
FFmpeg Command
Copy this command to run the same conversion locally with FFmpeg on your desktop. Download FFmpeg
Drop your M4A 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
M4A files typically contain AAC-encoded audio, which is a lossy format — meaning some audio data was permanently discarded when the file was first encoded. During this conversion, FFmpeg decodes the AAC stream back to raw PCM audio in memory, then re-encodes it using the FLAC codec at compression level 5. FLAC is lossless, so the resulting file is an exact representation of the decoded PCM — no additional quality loss occurs in this step. The compression level only affects file size and encoding speed, not audio fidelity. Importantly, since the original source was lossy AAC, the output FLAC will not 'recover' any quality beyond what AAC preserved. M4A chapters and iTunes-specific metadata tags may not fully carry over, as FLAC uses its own Vorbis comment metadata system.
What Each Flag Does
| Flag | What it does |
|---|---|
ffmpeg
|
Invokes the FFmpeg command-line tool, which handles all decoding, encoding, and container manipulation. In the browser version of this tool, FFmpeg.wasm provides the same functionality via WebAssembly without any server upload. |
-i input.m4a
|
Specifies the input file — an M4A container, which FFmpeg will open and demux to extract the AAC audio stream for decoding. |
-c:a flac
|
Sets the audio codec for the output to FLAC. FFmpeg will decode the AAC stream from the M4A to raw PCM, then re-encode it using the lossless FLAC codec — no video codec is needed since both M4A (in this context) and FLAC are audio-only formats. |
-compression_level 5
|
Sets FLAC's compression level to 5 (the default and a balanced midpoint). This controls how aggressively the FLAC encoder compresses the data — higher values produce smaller files but take longer to encode. Audio quality is identical at all levels since FLAC is always lossless. |
output.flac
|
Defines the output filename with the .flac extension, which tells FFmpeg to write the encoded audio into a FLAC container. The resulting file will be a standard, broadly compatible FLAC file playable in VLC, foobar2000, Roon, and most modern audio hardware. |
Common Use Cases
- Archiving an iTunes music library in a lossless open format that isn't tied to Apple's ecosystem or DRM infrastructure
- Preparing M4A podcast recordings or audiobook files for professional audio editing software that requires a lossless source to avoid generational quality loss during processing
- Migrating audio to a media player or NAS device (like a Naim, Linn, or Roon setup) that supports FLAC natively but not M4A or AAC
- Converting purchased M4A tracks (non-DRM) to FLAC for use with audiophile DACs or hardware players that prioritize open lossless formats
- Preserving a high-bitrate M4A master (e.g., 256k or 320k AAC) in FLAC before further transcoding to other formats, to avoid repeated lossy re-encoding
- Submitting audio files to a platform or client that requires lossless FLAC delivery and will not accept AAC-based containers
Frequently Asked Questions
No — FLAC is lossless, but it cannot restore audio data that AAC discarded during the original encoding. The FLAC file will be a perfect, bit-for-bit preservation of the decoded AAC audio, meaning it won't degrade further, but it also won't sound better than the source M4A. The benefit of converting to FLAC is preventing any additional quality loss in future processing or re-encoding steps, and ensuring compatibility with lossless-focused software and hardware.
AAC is a highly efficient lossy codec designed to produce small files by discarding audio data the encoder deems imperceptible. FLAC, by contrast, is lossless — it compresses audio without discarding anything, which inherently results in larger files. Even at compression level 8 (the maximum), FLAC files are typically 2–5x larger than a comparable AAC M4A. This size increase is expected and reflects the lossless nature of the output format, not a problem with the conversion.
Common tags like title, artist, album, track number, and genre are generally preserved, as FFmpeg maps them from M4A's iTunes atom-based metadata to FLAC's Vorbis comment tags. However, iTunes-specific fields (like Podcast URL, iTunes grouping atoms, or gapless playback metadata) and embedded chapter markers will likely be lost, since FLAC does not support chapters or those proprietary tag types. Cover art may or may not transfer depending on how it was embedded in the source M4A.
The -compression_level flag in FLAC controls the trade-off between encoding speed and output file size — it does not affect audio quality at any level. Level 5 is the default and a sensible balance: it produces reasonably compact files without being slow to encode. Setting it to 0 encodes very fast but results in larger files, while level 8 produces the smallest possible FLAC files but takes significantly longer. For most users, level 5 is ideal; audiophiles storing large libraries may prefer level 8 to save disk space.
On Linux or macOS, you can use a shell loop: `for f in *.m4a; do ffmpeg -i "$f" -c:a flac -compression_level 5 "${f%.m4a}.flac"; done`. On Windows Command Prompt, use: `for %f in (*.m4a) do ffmpeg -i "%f" -c:a flac -compression_level 5 "%~nf.flac"`. This applies the same conversion settings to every M4A file in the current directory, preserving each file's base name and outputting a matching .flac file.
No — DRM-protected M4A files (older iTunes purchases with FairPlay DRM) cannot be converted by FFmpeg or this tool, as the audio stream is encrypted and FFmpeg cannot decrypt it. Apple stopped selling DRM-protected music in 2009, so most modern iTunes purchases are DRM-free AAC M4A files and will convert without issue. If your file fails to convert, check whether it has a .m4p extension (protected) rather than .m4a (unprotected).
Technical Notes
M4A is an MPEG-4 container restricted to audio, most commonly holding AAC (Advanced Audio Coding) streams encoded at bitrates between 128k and 256k in iTunes purchases and Apple ecosystem recordings. When FFmpeg decodes this AAC stream to PCM and re-encodes to FLAC, it uses its native FLAC encoder, which is fully compliant with the FLAC specification. The -compression_level parameter maps directly to FLAC's internal preset levels (0–8), affecting only the LPC order, Rice partition order, and other compression parameters — the decoded PCM data encoded is identical at every level. One notable limitation: M4A supports gapless playback metadata (iTunSMPB atoms) that FLAC handles differently via its own frame-level padding; gapless behavior may not be preserved across players after conversion. Additionally, M4A files with multiple chapters (common in audiobooks) will lose that chapter structure entirely, as FLAC has no native chapter support — consider splitting the file by chapter before converting if chapter navigation is needed. FLAC's ReplayGain support is available but must be added separately after conversion using a tool like metaflac.