How M4A Works
M4A is not itself a codec but a container: the .m4a extension marks an MP4 file that holds only audio. MP4 is the ISO base media file format, a flexible box structure that can carry video, audio, subtitles, and metadata. When a file contains just an audio track, players and operating systems conventionally give it the .m4a name so it is treated as music rather than video, even though the underlying container is the same MP4 used for .mp4 movies.
The audio inside an M4A file is almost always one of two codecs. The common case is AAC (Advanced Audio Coding), a lossy codec that uses a modified discrete cosine transform (MDCT) and a psychoacoustic model to discard sound the ear is unlikely to notice, spending its bits on what remains. The other case is ALAC (Apple Lossless), which keeps every sample and compresses only the mathematical redundancy, so it decodes back to the exact original. The extension is the same for both, which is why you sometimes cannot tell a lossy from a lossless M4A by its name alone.
Because it is an MP4 container, M4A inherits MP4's conveniences. It stores rich tagging and cover art in a structured metadata region, supports fast seeking to any point without scanning the whole file, and can hold chapter markers, which is one reason it became a common format for audiobooks and podcasts. The container also records the sample rate, channel layout, and codec configuration a decoder needs to start playback cleanly.
In practice, the quality of an M4A depends entirely on what is inside it. An AAC-in-M4A file at a modest bitrate is a compact, lossy delivery file comparable to a good MP3 but smaller for the same quality; an ALAC-in-M4A file is several times larger but bit-for-bit identical to the master. The container is neutral: it is the codec choice at encode time that sets the trade-off between size and fidelity.
History and Standardization
M4A rose to prominence through Apple's iTunes and iPod ecosystem in the early 2000s, when Apple standardized on AAC in an MP4 container for purchased music and used the .m4a naming to distinguish audio-only files. The underlying MP4 container is defined by the MPEG family of ISO standards, and AAC itself was standardized within the MPEG-2 and MPEG-4 specifications, so M4A sits on a foundation of widely adopted international standards rather than a proprietary invention.
Apple's scale gave the format enormous reach. AAC-in-M4A became the default for the iTunes Store, later Apple Music, and the iOS device family, and support spread to essentially every modern phone, browser, and media player. The parallel ALAC variant, which Apple later released as open source, gave the same container a lossless option for listeners who wanted archival quality within the Apple world.
Because M4A is just MP4 carrying audio, its long-term stability comes from the ubiquity of the MP4 container. Any device that can play MP4 video can decode an M4A audio file, so the format benefits from the same broad hardware and software support that video streaming and mobile devices built around MPEG-4.
M4A Compared to MP3 and FLAC
Against MP3, an AAC-based M4A is the technically stronger delivery format: it generally sounds better at the same bitrate and degrades more gracefully at low bitrates, thanks to AAC's more modern design. MP3's only remaining edge is universality on very old hardware and its now royalty-free status, but for anything made in the last fifteen years M4A is the better lossy choice.
Against FLAC, the comparison depends on which M4A you have. A lossless ALAC-in-M4A file is FLAC's direct peer: both are lossless and produce similar sizes, and the practical difference is ecosystem, ALAC is most at home on Apple devices while FLAC has wider cross-platform and hardware support. A lossy AAC-in-M4A file, by contrast, is not comparable to FLAC at all, since it has already discarded data that FLAC would have preserved.
The one recurring pitfall with M4A is exactly that ambiguity of contents. Because the extension does not tell you whether the audio is lossy AAC or lossless ALAC, it is easy to assume an M4A is archival quality when it is not. When fidelity matters, check the actual codec and bitrate rather than trusting the file name, and keep a known lossless master for any editing or archival workflow.