Apple Lossless Audio Codec (.alac)

Apple Standard

Apple 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:

Select or drop files here

100% private in-browser conversion - files never leave your device

or paste Ctrl+V
Zero-Network-Transmission Privacy Guarantee: 0 bytes uploaded to external servers. All processing occurred locally in your browser sandbox.

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 20

ASCII REPRESENTATION: ....ftypM4A

Standardization: Apple Open Source / ISO 14496-12

Technical Specifications

Container ArchitectureISO Base Media File Format (MPEG-4 Part 14) container with 'alac' atom
CompressionAdaptive Linear Predictive Coding (LPC) and Rice-Golomb entropy coding
Byte EndiannessBig-Endian container atoms; frame payload bit-packed
Color SpacesN/A (Lossless Audio Stream)
Channels & StructureUp to 8 audio channels (stereo, 5.1 surround, and 7.1 surround)
Max DimensionsSample rates from 44.1 kHz to 192 kHz at 16, 24, or 32-bit resolution
Transparency100% mathematically lossless reconstruction of uncompressed PCM data
Streaming & ProgressiveNative QuickTime 'moov' atom placement at front of file enables instant byte-range streaming

Technical Comparison Matrix: ALAC vs Competitors

Technical AttributeALAC (Current)FLACWAVAPE
Compression Quality100% mathematically lossless100% mathematically losslessUncompressed lossless100% mathematically lossless
Apple Ecosystem Support100% native on all Apple devicesRequires third-party player or quicklook pluginNative uncompressedUnsupported without third-party tools
Decoding ComplexityExtremely light; hardware-friendly for battery lifeVery light and fastZero CPU decompression overheadHigh; heavy CPU requirements
Container WrapperMPEG-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

2021Apple Music upgrades its entire 100-million song streaming catalog to lossless ALAC up to 24-bit/192 kHz.
2011Apple releases ALAC reference encoder and decoder as open source under the Apache 2.0 license.
2004Introduced alongside QuickTime 6.5.1 and iTunes 4.5 for lossless ripping and playback.

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.