.M4A MPEG-4 Audio
.m4a

MPEG-4 Audio

Convert M4A audio to MP3, WAV, or OGG directly in your browser — no upload, no server, no quality loss from intermediate steps. FileDex uses FFmpeg WebAssembly to decode AAC or ALAC audio from the MPEG-4 container and re-encode locally.

Learn more ↓
Audio structure
ftyp M4A brand
moov audio tracks
mdat AAC samples
Audio ContainerISO BMFFAAC / ALACApple2001
By FileDex

Your files never leave your device

Common questions

What is the difference between M4A and MP4?

M4A and MP4 use the identical MPEG-4 Part 14 container format. The only difference is intent — .m4a signals audio-only content while .mp4 may contain video, audio, and subtitles. Renaming .m4a to .mp4 (or vice versa) does not change the file structure.

Can I convert M4A to MP3 without losing quality?

If the M4A contains AAC audio (lossy), converting to MP3 introduces generation loss — both are lossy codecs and re-encoding discards additional audio data. If the M4A contains ALAC (lossless), decoding to PCM is lossless, but the MP3 encoding step is lossy. Use the highest practical MP3 bitrate (VBR -q:a 2 or CBR 320 kbps) to minimize further degradation.

How do I tell if my M4A file contains AAC or ALAC?

Run ffprobe -v error -show_entries stream=codec_name input.m4a. AAC files report 'aac' as the codec, while Apple Lossless files report 'alac'. File size is also a strong indicator — a 4-minute ALAC track is typically 25-35 MB, while AAC at 256 kbps is around 7.5 MB.

Why can my Android phone play M4A but my car stereo cannot?

Most car stereos support MP3 and sometimes WMA, but lack AAC decoders required for M4A playback. Android has built-in AAC-LC support since version 1.0. Convert M4A to MP3 for car stereo compatibility.

Does FileDex upload my M4A file to a server?

No. FileDex converts M4A files entirely in your browser using FFmpeg compiled to WebAssembly. The audio data never leaves your device — all decoding and encoding happens locally in a sandboxed Web Worker.

What makes .M4A special

Stripped of video tracks, M4A is Apple's answer to a simple question: why ship a full MP4 container when the file holds only audio? The format uses the identical ISOBMFF (ISO Base Media File Format) box structure as MP4 but signals its audio-only nature through the ftyp box brand. "M4A " (with a trailing space, hex 4D 34 41 20) marks AAC-encoded files; "M4B " marks audiobooks carrying chapter markers and bookmark data. iTunes reads this brand byte to route downloads into Music or Books — swap the four bytes and the same file lands in a different library.

Continue reading — full technical deep dive

Internal structure

An M4A file contains the same box hierarchy as MP4: ftyp, moov, and mdat. The moov box holds all metadata — track headers, sample tables, timing info. The mdat box stores raw compressed audio frames. A stbl (sample table) box inside moov maps each audio frame to its byte offset in mdat, enabling sample-accurate seeking without scanning the entire file.

The default audio codec is AAC-LC (Low Complexity), though M4A also supports HE-AAC v1 (SBR), HE-AAC v2 (SBR + Parametric Stereo), and Apple Lossless (ALAC). When ALAC is used, the file is sometimes given an .m4a extension and sometimes .alac, but the container format is identical.

AAC-LC performance in M4A

Bitrate Stereo quality Typical use
96 kbit/s Good for speech/podcasts Podcast distribution
128 kbit/s Transparent for most listeners iTunes Store default (pre-2023)
256 kbit/s Transparent Apple Music AAC tier, iTunes Plus
~900 kbit/s Lossless (ALAC, 16-bit/44.1 kHz) Apple Music Lossless tier

Apple Music streams AAC at 256 kbit/s for its standard tier. The lossless tier ships ALAC inside the same M4A container, bumping file sizes roughly 3-4x.

Metadata: MP4 atoms vs. ID3

M4A does not use ID3 tags. Metadata lives in udta (user data) and ilst (item list) boxes inside moov. Common atoms: ©nam (title), ©ART (artist), ©alb (album), covr (cover art as embedded JPEG or PNG). Gapless playback data is stored in an iTunSMPB atom — a proprietary Apple extension that records encoder delay and padding samples so players can trim silence between tracks.

Compatibility and limitations

Every Apple device plays M4A natively. Android has supported AAC-in-M4A since API level 1. Windows plays M4A through the Media Foundation AAC decoder, included since Windows 7. Browser support via <audio> tags covers Chrome, Safari, Edge, and Firefox (since version 22).

The main limitation is tooling assumptions. Some audio editors still treat M4A as a video format and reject it on import. Batch processing scripts built for MP3/WAV pipelines may need explicit M4A handling. The container overhead is minimal — roughly 1–3 KB for the moov box on a typical 4-minute track — so there is no meaningful size penalty versus raw AAC in ADTS framing.

When to use M4A over MP3

M4A with AAC-LC at 128 kbit/s matches MP3 quality at 192 kbit/s. For podcast distribution, 96 kbit/s AAC in M4A cuts bandwidth nearly in half compared to 128 kbit/s MP3 with no perceptible loss. Choose MP3 only when targeting hardware that lacks AAC decoding — an increasingly rare scenario. FileDex converts between M4A, MP3, FLAC, WAV, and other audio formats entirely in the browser with no server upload.

.M4A compared to alternatives

.M4A compared to alternative formats
Formats Criteria Winner
.M4A (AAC) vs .MP3
Audio quality at 128 kbps
AAC-LC in M4A uses improved MDCT windowing and temporal noise shaping, producing 20-30% better perceived quality than MP3 at the same bitrate. The difference is most audible below 128 kbps.
M4A (AAC) wins
.M4A (AAC) vs .OGG VORBIS
Browser support
OGG Vorbis has native support in Chrome, Firefox, and Edge without codec licensing. M4A/AAC playback in Firefox on Linux historically required GStreamer AAC plugins, though modern distributions include them.
OGG VORBIS wins
.M4A (ALAC) vs .FLAC
Cross-platform support
FLAC is natively supported on Windows, Linux, Android, and most hardware players. ALAC-in-M4A is primarily supported on Apple platforms — Android and Linux support depends on third-party decoders.
FLAC wins
.M4A vs .WAV
File size (3-minute song)
AAC at 256 kbps produces roughly 5.7 MB for a 3-minute track, while WAV at 16-bit 44.1 kHz requires approximately 30 MB — a 5:1 ratio with perceptually transparent quality from AAC.
M4A wins

Technical reference

MIME Type
audio/mp4
Magic Bytes
00 00 00 xx 66 74 79 70 ftyp box with M4A or mp42 brand.
Developer
Apple Inc. / ISO
Year Introduced
2001
Open Standard
Yes
00000000000000XX66747970 ....ftyp

ftyp box with M4A or mp42 brand.

Binary Structure

M4A files use the ISO Base Media File Format (ISOBMFF), identical to MP4 but restricted to audio streams. The file begins with a size prefix (4 bytes big-endian) followed by the ftyp box containing the brand identifier 'M4A ' (4D 34 41 20). The moov box holds all metadata: mvhd (movie header with timescale and duration), trak (one per audio stream), and udta/meta (iTunes metadata atoms). Each trak contains mdia → minf → stbl, which indexes sample offsets, sizes, and timing via stts, stsc, stsz, and stco/co64 boxes. The actual compressed audio frames reside in one or more mdat boxes. The moov box position is critical — if moov follows mdat (common after recording), players must download the entire file before playback starts. The -movflags +faststart flag in FFmpeg relocates moov before mdat for streaming.

OffsetLengthFieldExampleDescription
0x00 4 bytes Box Size 00 00 00 20 Size of the ftyp box in bytes (big-endian). Value 0x20 = 32 bytes for a standard M4A ftyp.
0x04 4 bytes Box Type 66 74 79 70 (ftyp) FourCC identifying this as a File Type box — present in all ISOBMFF files.
0x08 4 bytes Major Brand 4D 34 41 20 (M4A ) Identifies this as an audio-only MPEG-4 file. iTunes uses this brand for AAC purchases.
0x0C 4 bytes Minor Version 00 00 00 00 Version of the major brand specification. Typically zero for M4A files.
0x10 variable Compatible Brands 69 73 6F 6D 4D 34 41 20 (isom M4A ) List of compatible brands — isom (ISO Base Media), mp42, M4A are common entries.
2001Apple introduces M4A as the audio-only MPEG-4 variant for iTunes Store purchases2003iTunes Music Store launches selling AAC-in-M4A at 128 kbps with FairPlay DRM2004Apple Lossless (ALAC) codec released, using .m4a extension for lossless audio distribution2007iTunes Plus launches — 256 kbps AAC-LC without DRM, still using .m4a containers2011Apple open-sources the ALAC codec under Apache License 2.02015Apple Music streaming service launches, using M4A/AAC as its primary delivery format
Convert M4A to MP3 (high-quality VBR) ffmpeg
ffmpeg -i input.m4a -c:a libmp3lame -q:a 2 output.mp3

-q:a 2 sets LAME VBR quality level 2, targeting approximately 190 kbps with dynamic bitrate allocation. This produces near-transparent MP3 output from an AAC source.

Convert M4A to WAV (uncompressed PCM) ffmpeg
ffmpeg -i input.m4a -c:a pcm_s16le -ar 44100 output.wav

-c:a pcm_s16le selects signed 16-bit little-endian PCM. -ar 44100 resamples to CD-standard sample rate. Omit -ar to preserve the source sample rate.

Extract AAC stream from M4A without re-encoding ffmpeg
ffmpeg -i input.m4a -c:a copy -vn output.aac

-c:a copy performs stream copy — the AAC bitstream transfers directly without decoding or re-encoding. -vn strips any embedded cover art video stream. Zero quality loss.

Inspect M4A container structure ffprobe
ffprobe -v error -show_entries format=format_name,duration,bit_rate -show_entries stream=codec_name,sample_rate,channels,bits_per_raw_sample -of json input.m4a

Displays the container format, duration, overall bitrate, and per-stream codec details (AAC-LC vs ALAC, sample rate, channel count) in JSON output without decoding audio data.

M4A MP3 transcode lossy MP3 remains the universal baseline for hardware audio players, car stereos, and legacy devices that lack AAC decoder support. Transcoding M4A to MP3 ensures playback on any audio device manufactured since 1998.
M4A WAV transcode lossless Audio editing software (Pro Tools, Audacity, Logic Pro) often requires uncompressed PCM input. Decoding M4A to WAV produces a lossless representation of the decoded audio with no further quality loss.
M4A OGG transcode lossy Vorbis in OGG is fully patent-free with no licensing restrictions, making it the preferred format for open-source applications, game engines, and web audio where royalty concerns apply.
M4A (ALAC) FLAC transcode lossless ALAC-in-M4A is lossless but Apple-ecosystem-specific. Transcoding to FLAC produces an identical lossless result in a format supported by all major non-Apple platforms and archival workflows.
LOW

Attack Vectors

  • Malformed moov box with crafted stco offsets pointing outside file boundaries can trigger out-of-bounds reads in parsers that do not validate sample offsets against file size
  • Embedded cover art (covr atom) containing a malicious JPEG/PNG payload exploits image decoder vulnerabilities in players that auto-render artwork
  • Deeply nested box structures with recursive or circular references can cause stack overflow in recursive ISOBMFF parsers

Mitigation: FileDex processes M4A files entirely in-browser using FFmpeg WebAssembly sandboxed in a Web Worker. No file data leaves the device. FFmpeg's mature ISOBMFF parser handles malformed boxes gracefully.

FFmpeg tool
Universal media framework with native AAC/ALAC decoding and M4A container read/write support
Apple Music / iTunes tool
Native M4A player and encoder — the primary source of M4A files in consumer audio workflows
foobar2000 tool
Lightweight Windows audio player with native M4A/AAC/ALAC decoding and metadata editing
VLC Media Player tool
Cross-platform media player with native M4A playback including ALAC and HE-AAC streams
FAAD2 library
Open-source AAC decoder library used by many third-party players for M4A playback
mp4v2 library
C library for reading and writing MPEG-4 containers including M4A metadata atoms