Apple Lossless Audio Codec (.alac)
Apple StandardApple Lossless Audio Codec (ALAC) is a lossless audio compression format developed by Apple to deliver bit-perfect audio reproduction at 40% to 60% lower file sizes than uncompressed PCM.
Convert ALAC to FLAC
Free in-browser ALAC to FLAC converter. Convert files instantly on your device.
Inspect & Metadata
Operating systems and file analyzers identify ALAC files by inspecting the leading binary byte sequence:
Byte-Level Header Signature (Magic Bytes)
Operating systems and file analyzers identify ALAC files by inspecting the leading binary byte sequence:
HEX SIGNATURE (OFFSET 0):
00 00 00 20 66 74 79 70 4D 34 41 20ASCII REPRESENTATION: ....ftypM4A
Standardization: Apple Open Source / ISO 14496-12
Technical Specifications
| Container Architecture | ISO Base Media File Format (MPEG-4 Part 14) container with 'alac' atom |
| Compression | Adaptive Linear Predictive Coding (LPC) and Rice-Golomb entropy coding |
| Byte Endianness | Big-Endian container atoms; frame payload bit-packed |
| Color Spaces | N/A (Lossless Audio Stream) |
| Channels & Structure | Up to 8 audio channels (stereo, 5.1 surround, and 7.1 surround) |
| Max Dimensions | Sample rates from 44.1 kHz to 192 kHz at 16, 24, or 32-bit resolution |
| Transparency | 100% mathematically lossless reconstruction of uncompressed PCM data |
| Streaming & Progressive | Native QuickTime 'moov' atom placement at front of file enables instant byte-range streaming |
Technical Comparison Matrix: ALAC vs Competitors
| Technical Attribute | ALAC (Current) | FLAC | WAV | APE |
|---|---|---|---|---|
| Compression Quality | 100% mathematically lossless | 100% mathematically lossless | Uncompressed lossless | 100% mathematically lossless |
| Apple Ecosystem Support | 100% native on all Apple devices | Requires third-party player or quicklook plugin | Native uncompressed | Unsupported without third-party tools |
| Decoding Complexity | Extremely light; hardware-friendly for battery life | Very light and fast | Zero CPU decompression overhead | High; heavy CPU requirements |
| Container Wrapper | MPEG-4 Part 14 container (.m4a) | Native Ogg/FLAC bitstream (.flac) | RIFF container (.wav) | Custom Monkeys Audio container (.ape) |
Common Corruption Modes & Hex Recovery Guide
Audio file plays for a few seconds then abruptly terminates or player shows 0:00 duration.
Root Cause: Missing or truncated 'moov' atom due to incomplete download or audio recorder crashing before closing the file.
Recovery: Use untrunc or MP4Box to recover and transplant a valid moov atom from a sister recording made with identical settings.
Security Analysis & Parser Attack Vectors
ALAC decoders parse complex MPEG-4 atom trees and adaptive LPC prediction coefficients which can expose memory corruptions if bounds are unchecked.
Known Attack Vectors
- Buffer overflow in LPC predictor order parsing when receiving coefficient orders exceeding 32.
- Out-of-bounds frame write during multichannel downmixing inside legacy QuickTime components (CVE-2011-3258).
- Atom size integer overflow causing insufficient heap buffer allocation during decoding.
Defensive Best Practices: Enforce strict atom size limits and validate predictor coefficients against maximum allowable bit-depth prior to allocation.
Historical Origins & Milestones
Key Advantages & Pros
- Bit-for-bit lossless accuracy: completely reconstructs the original CD or studio master recording.
- 100% native out-of-the-box integration with iOS, iPadOS, macOS, Apple Watch, and AirPlay streaming.
- Full support for embedded high-resolution artwork, chapter markers, and rich iTunes-style metadata.
Technical Limitations & Cons
- Less broad non-Apple hardware support compared to the universally adopted open FLAC format.
- Typically compresses 2% to 5% larger than FLAC due to conservative Rice-Golomb coder tuning.
- Shares the identical .m4a file extension with lossy AAC, causing user confusion about file compression type.
Interesting Technical Trivia
- Apple AirPlay transmits real-time audio over local Wi-Fi streams encoded in 16-bit/44.1 kHz ALAC.
- Before Apple open-sourced ALAC in 2011, reverse engineer David Hammerton wrote the first open decoder by studying iTunes disassembly.
- An ALAC stream inside an MP4 file is identified by the four-character code 'alac' inside the 'stsd' sample description atom.
Frequently Asked Technical Questions
How can I tell if my .m4a file is lossy AAC or lossless ALAC?
Because Apple uses .m4a for both, inspect the file in a player or converter. An ALAC file typically has a bitrate between 700 and 1100 kbps, whereas an AAC file ranges from 128 to 320 kbps.
Can I convert FLAC to ALAC without losing any audio quality?
Yes. Both formats are mathematically lossless. Converting from FLAC to ALAC is bit-identical and results in zero generational loss.
Why did Apple create ALAC instead of adopting FLAC?
In 2004, Apple needed an audio codec that integrated directly with their QuickTime and iPod hardware architectures, ensuring seamless DRM and metadata management inside the MP4 container.