File types · Explainer

The M4A file (.m4a)

An M4A file is an MP4 file that holds only sound, usually compressed with AAC and sometimes stored losslessly with Apple Lossless. This guide explains what's inside one, how its tags and codecs work, the quirks worth knowing, and has free sample M4A files to download for testing.

At a glance

Full name
MPEG-4 Audio (an audio-only MPEG-4 Part 14 file)
Extensions
.m4a; related: .m4b (audiobooks), .m4r (iPhone ringtones), .m4p (copy-protected)
MIME type
audio/mp4; Apple software also uses audio/x-m4a
Kind
Binary container. Lossy with AAC inside, lossless with ALAC inside
Standard or owner
ISO/IEC 14496-14 (the MP4 file format); the .m4a name and the tag layout come from Apple
First released
The MP4 file format in 2003; Apple's iTunes made .m4a common from the same period
Common codecs
AAC-LC, HE-AAC and HE-AAC v2 (lossy); ALAC, Apple Lossless (lossless)
Opens with
Every current web browser (AAC), Apple Music, QuickTime Player, Windows Media Player, VLC, phones
Typical size
About 1 MB per minute of AAC at 128 kbps (128,000 bits × 60 s ÷ 8 = 960,000 bytes), plus tags and cover art
Magic number
66 74 79 70 (ftyp) at byte 4, usually followed by the brand 4D 34 41 20 (M4A )

The basics

What is an M4A file?

An M4A file is an MP4 file with no video in it. The extension was introduced by Apple so that music libraries and players could tell audio-only files from videos at a glance; inside, the structure is the same as any .mp4. Songs bought from the iTunes Store, iPhone Voice Memos recordings, many podcast and audiobook files and exports from music apps are all M4A files.

Like MP4, M4A is a container: it doesn't decide how the sound is compressed. Almost every M4A holds one of two codecs:

  • AAC (Advanced Audio Coding), a lossy codec designed as the successor to MP3. It sounds better than MP3 at the same bit rate, especially at low bit rates, and is what most M4A files contain.
  • ALAC (Apple Lossless Audio Codec), which compresses without losing anything, like FLAC. Apple published it as open source under the Apache licence in 2011.

So an M4A can be either lossy or lossless, and the extension won't tell you which. The codec line in a player's info panel, or ffprobe, will: aac or alac.

Anatomy

What's inside an M4A file

An M4A file has the same structure as an MP4 video: a series of boxes (also called atoms), each starting with a 4-byte size and a 4-letter type, some nested inside others. Here is the box tree of sample-aac-tags.m4a, our 10-second sample, as read from the file. Offsets and sizes are in bytes; a few small boxes are left out to save space.

sample-aac-tags.m4a (box tree)
offset    size       box
0         32         ftyp   file type
                            00 00 00 20 66 74 79 70 4D 34 41 20 00 00 00 00
                            4D 34 41 20 6D 70 34 32 69 73 6F 6D 00 00 00 00
32        13,054     moov   the index
40        108          mvhd   movie header: timescale, duration
148       2,260        trak   the audio track
288       33             hdlr   handler type "soun"
389       103            stsd   sample entry "mp4a" with an esds box
                                AudioSpecificConfig 12 10: AAC-LC, 44.1 kHz, 2 ch
492       24             stts   timing: 433 frames of 1,024 samples
556       1,752          stsz   the size of every AAC frame
2,308     100            stco   where each chunk of frames starts
2,408     10,678       udta
2,416     10,670         meta
2,461     9,432            ilst   the tags
2,469     65                 ©nam   title
2,534     46                 ©ART   artist
2,580     51                 ©alb   album
2,665     32                 trkn   track 1 of 1
2,725     67                 ©too   encoder
2,792     188                ----   com.apple.iTunes: iTunSMPB
2,980     8,809              covr   cover art: a 300×300 PNG
11,789    104                ©cmt   comment
11,893    1,193            free   room for the tags to grow
13,086    1,024      free   spare space
14,110    8          free
14,118    160,876    mdat   433 AAC frames, about 371 bytes each
  1. 166 74 79 70 4D 34 41 20

    The file type box and its brand

    ftyp at byte 4, then the major brand M4A (with a trailing space, because brands are always 4 characters). Compatible brands mp42 and isom tell other MP4 readers they can open it too. The brand is a hint, not a guarantee: plenty of M4A files say isom or mp42 instead.

  2. 2moov at byte 32

    The index comes first

    moov describes the track and says where every frame is. Here it sits before the audio, so a browser can start playing while the rest downloads. Recorders often write it at the end instead, as described on the MP4 page.

  3. 3stsd: mp4a + esds

    Which codec

    The sample entry mp4a means MPEG-4 audio. The real detail is the 2-byte AudioSpecificConfig inside the esds box: 12 10 decodes to object type 2 (AAC-LC), sample rate index 4 (44,100 Hz) and 2 channels. An ALAC file has the sample entry alac instead.

  4. 4stts, stsz, stco

    The sample tables

    433 frames of 1,024 samples each, the size of every frame, and where each group of frames starts in the file. Seeking to a time is a lookup in these tables, which is why M4A seeks precisely and MP3 sometimes doesn't.

  5. 5udta › meta › ilst

    The tag list

    Apple's iTunes-style metadata. Each tag is a box named after the field, often starting with the © byte (A9 in hex): ©nam title, ©ART artist, ©alb album, trkn track number. Inside each one, a data box holds the value and a type code (1 for UTF-8 text).

  6. 6---- iTunSMPB

    Gapless playback information

    A free-form tag (----) in the com.apple.iTunes namespace. Its value 00000800 00000158 …6BAA8 says the encoder added 2,048 samples of delay at the start and 344 samples of padding at the end around exactly 441,000 real samples (10.000 seconds).

  7. 7covr

    Cover art

    The image file itself, inside a data box with type 14 (PNG) or 13 (JPEG). At 8.8 KB it's the biggest tag in this file.

  8. 8free

    Spare space

    Boxes that every reader skips. Tag editors use them as room to grow, so changing a title doesn't mean rewriting the whole file and updating every offset in stco.

  9. 9mdat

    The audio

    433 raw AAC frames, back to back, with no headers of their own: everything a decoder needs to know is in moov. Compare this with a raw .aac file, where each frame carries a 7-byte header instead.

Under the hood

How an M4A file is put together

Two boxes do almost all the work. mdat holds the compressed audio frames, packed together with nothing in between. moov holds everything else: the duration, the codec settings, a table with the size and position of every frame, and the tags. A player reads moov first, then fetches frames from mdat as it needs them.

  • Seeking is exact. Because the index lists every frame, a player can jump to 3:27 by calculation instead of guessing from the bit rate, which is how MP3 players handle files without a seek table.
  • The order of the boxes matters online. If moov is at the end, a browser has to fetch the end of the file before it can play anything. Moving it to the front (ffmpeg -i in.m4a -c copy -movflags +faststart out.m4a) fixes that without re-encoding.
  • Gapless playback is recorded. AAC encoders add a short silence at the start (the encoder delay) and pad the last frame. An M4A can store how much, in the iTunSMPB tag or in an edit list, so gapless-aware players trim it and live albums play without gaps. A raw .aac file has nowhere to store this.

Same music, three files

Our featured M4A and the featured samples on the AAC page and MP3 page use the same 10 seconds of music. As AAC in M4A it's 174,994 bytes including 8.8 KB of cover art; as raw AAC with ADTS headers, 160,868 bytes; as a 128 kbps MP3 with tags and cover art, 171,104 bytes.

Codecs

The codecs inside: AAC, HE-AAC and ALAC

CodecSample entryCompressionUsed for
AAC-LC (Low Complexity)mp4aLossyMusic and podcasts at about 96 to 256 kbps. The default almost everywhere.
HE-AAC (v1)mp4aLossyLow bit rates, about 32 to 64 kbps for stereo: internet radio and streaming. Adds spectral band replication (SBR).
HE-AAC v2mp4aLossyVery low bit rates, around 32 kbps and below for stereo. Adds parametric stereo (PS) to SBR.
ALAC (Apple Lossless)alacLosslessArchiving CDs and high-resolution music in Apple's ecosystem. Decodes to exactly the original samples.

All three AAC flavours use the same sample entry, mp4a; the difference is in the AudioSpecificConfig. Our sample-he-aac-v2.m4a shows how HE-AAC stays backward-compatible: its config first describes plain AAC-LC at 22,050 Hz in mono, then adds an extension that switches on SBR (restoring 44,100 Hz and the high frequencies) and PS (restoring stereo). A decoder that only knows AAC-LC still plays something, just duller and in mono.

The MP4 container can carry other codecs too, such as MP3, FLAC and Opus, but files like that normally use the .mp4 extension, and some Apple software won't play them as .m4a.

Variants

M4A, M4B, M4R, M4P and MP4: what the extensions mean

ExtensionWhat it is
.m4aAudio-only MP4, AAC or ALAC. Music, recordings, podcasts.
.m4bThe same format, named so Apple's apps treat it as an audiobook or podcast: they remember the playback position and show chapters. Renaming .m4b to .m4a or back doesn't change the file.
.m4rAn iPhone ringtone: an M4A with AAC audio and a different extension.
.m4pAAC protected with Apple's FairPlay copy protection, from older iTunes Store purchases. Only plays in Apple software signed in with the buyer's account.
.mp4The general MP4 extension. An audio-only .mp4 and an .m4a are the same thing; renaming between them is safe.
.aacNot a container: raw AAC frames with small ADTS headers. See the AAC explainer.

Metadata

Tags, cover art and chapters

M4A metadata lives in the ilst box inside moov › udta › meta. The layout comes from iTunes rather than from the MPEG standard, but every major tag editor and player reads it. Common fields:

BoxField
©namTitle
©ART / aARTArtist / album artist
©albAlbum
trkn / diskTrack and disc number, stored as numbers (e.g. 1 of 12)
©dayYear or date
©genGenre
©cmt, ©lyrComment, lyrics
covrCover art, JPEG or PNG
----A free-form field with its own name and namespace, such as iTunSMPB or ReplayGain values

Chapters, used by audiobooks and podcasts, are stored in one of two ways, and good files have both: a QuickTime chapter track (a text track whose samples are the chapter titles, linked from the audio track by a tref box) and a Nero-style chpl box with a list of start times and titles. Apple software reads the first, many other players the second. Our sample-chapters.m4a has both.

Related formats

M4A vs MP3, AAC, FLAC and Ogg

FormatCompressionNotes
.m4a (AAC)LossyBetter than MP3 at the same bit rate, exact seeking, gapless information, rich tags. Plays in every current browser and phone.
.m4a (ALAC)LosslessApple's lossless option. Outside Apple's apps and Safari, support is patchier than for FLAC.
.mp3LossyPlays on more old hardware, such as car stereos and early players. Slightly larger for the same quality.
.aacLossyThe same AAC audio without a container: no index, no gapless information, no proper tags.
.flacLosslessThe open lossless standard, with wider support than ALAC outside Apple's software.
.ogg, .opusLossyOpen, royalty-free codecs (Vorbis, Opus) in the Ogg container. Opus beats AAC at low bit rates.

Converting AAC to MP3, or one AAC to another, stacks the losses of both encodings. Convert from a lossless original where you can. Converting ALAC to FLAC, or back, is lossless both ways.

Troubleshooting

Common M4A problems and their causes

  • Plays on a Mac or iPhone but not elsewhere: it's probably ALAC. Check the codec with ffprobe or VLC's codec information; convert to FLAC or AAC for wider support.
  • Won't play until it has fully downloaded: moov is at the end of the file. Remux it with -movflags +faststart.
  • Sounds dull or narrow on one device and fine on another: an HE-AAC file played by a decoder without SBR support, which plays only the low-frequency core. HE-AAC v2 can also collapse to mono.
  • A tiny gap between tracks of a live album: the player ignores the encoder delay and padding stored in the file, or a converter dropped the iTunSMPB tag or edit list.
  • Won't play at all, and the file came from an old iTunes library: it may be an .m4p with FairPlay copy protection, renamed. Only Apple software authorised for that account plays those.
  • Tags or cover art missing after conversion: some converters copy only the audio. Check the converter's metadata options, or copy the tags across with a tag editor.

How to

How to open, edit and convert an M4A file

  • Play it: double-click it. On Windows the Media Player app opens AAC M4A files; on a Mac, Music or QuickTime Player. Phones play AAC M4A in their file and music apps, and browsers play it when you drag it in or put it online. VLC plays both AAC and ALAC on every system.
  • Edit the sound: Audacity (with its FFmpeg import option), GarageBand or any audio editor. Re-exporting AAC re-encodes it, so export once at the end.
  • Trim without re-encoding: ffmpeg -ss 10 -t 30 -i in.m4a -c copy out.m4a cuts at AAC frame boundaries without losing quality.
  • Edit tags and cover art: Mp3tag (Windows, macOS), Kid3 (all platforms), MusicBrainz Picard, or the Get Info window in Apple's Music app.
  • Convert: to MP3, ffmpeg -i in.m4a -c:a libmp3lame -q:a 2 out.mp3. From WAV to AAC M4A, ffmpeg -i in.wav -c:a aac -b:a 192k out.m4a. Between ALAC and FLAC, ffmpeg -i in.m4a -c:a flac out.flac, which loses nothing.

Is an M4A file safe?

It can't run code. As with any media file, a deliberately malformed one could trigger a bug in a player, so keep software updated. Recordings from phones can carry the recording date and device model in their tags: check them with ffprobe before you publish one.

Free downloads

Sample M4A files to download

Free sample M4A files for testing players, tag readers, upload forms and audio pipelines. The sounds are generated chords, tones and sweeps, encoded with the Fraunhofer FDK AAC encoder, FFmpeg's AAC encoder and FFmpeg's ALAC encoder. Each file was checked with ffprobe and decoded in full without errors.

sample-aac-tags.m4a · 170.9 KBDownloadOpen

What's inside sample-aac-tags.m4a

A 10-second M4A with AAC-LC at 128 kbps, 44.1 kHz stereo, iTunes-style tags and cover art, and the index at the front. The box tree in the anatomy above is this file.

  1. The music

    Five two-second chords (C, A minor, F, G, C), the same as our MP3 sample. Bass notes lean left and upper notes right, so you can hear whether stereo survives.

  2. The brand

    ftyp declares the major brand M4A , with mp42 and isom as compatible brands.

  3. Faststart

    moov sits at byte 32 and the audio at byte 14,118, so playback can start as soon as the first frames arrive.

  4. The codec

    AAC-LC, constant 128 kbps: 433 frames of 1,024 samples, about 371 bytes each.

  5. Tags

    Title, artist, album, track 1 of 1, year, genre and a comment naming this page, in ilst.

  6. Cover art

    A 300×300 PNG in a covr box. Players that show artwork should display it.

  7. Gapless information

    The iTunSMPB tag marks 2,048 samples of encoder delay and 344 of padding. Players that use it play exactly 10.000 seconds; ffprobe, which counts every frame, reports 10.054.

All sample M4A files

  • AAC M4A with tags and cover art

    sample-aac-tags.m4a · 170.9 KB (174,994 bytes)

    10 seconds, AAC-LC 128 kbps CBR, 44.1 kHz stereo, moov first. iTunes-style tags, PNG cover art and gapless information.

    • Checking a player, host or upload form handles standard M4A
    • Testing tag readers and cover art display
  • Apple Lossless (ALAC) M4A

    sample-alac.m4a · 151.4 KB (155,050 bytes)

    The 4 seconds of CD-quality chords from our WAV sample, compressed losslessly: 155,050 bytes instead of 705,880. Sample entry alac, 16-bit, 44.1 kHz stereo.

    • Checking whether a browser or device plays ALAC
    • Lossless round-trip tests (decode and compare with the WAV)
  • HE-AAC v2 at 32 kbps

    sample-he-aac-v2.m4a · 44.1 KB (45,123 bytes)

    The featured chords at 32 kbps with SBR and parametric stereo. The core is AAC-LC at 22.05 kHz mono; a full decoder outputs 44.1 kHz stereo.

    • Testing HE-AAC v2 decoding (a muffled or mono result means it isn't fully supported)
    • Low-bit-rate streaming pipelines
  • M4A with three chapters

    sample-chapters.m4a · 91.5 KB (93,734 bytes)

    15 seconds of mono AAC in three 5-second chapters, each a chord followed by one, two or three beeps, so you can hear which chapter you're in. Chapters are stored both as a QuickTime chapter track and a Nero chpl box.

    • Testing chapter support in audiobook and podcast players
    • Checking that conversions keep chapters
  • 1 MB M4A file (frequency sweep)

    sample-1mb.m4a · 1 MB (1,048,576 bytes)

    A 60-second sine sweep from 20 Hz to 20 kHz, AAC-LC at 128 kbps, padded with a trailing free box to exactly 1,048,576 bytes (1 MiB). Turn the volume down: it's a test tone.

    • Upload and size-limit tests
    • Hearing or measuring an encoder's high-frequency cutoff

Ways to test with them

  • Codec support: play sample-aac-tags.m4a and sample-alac.m4a in the browser or device you care about. If only the first plays, it has no ALAC decoder.
  • HE-AAC: sample-he-aac-v2.m4a should sound like the featured file, a little less crisp. If it sounds muffled or comes out in mono, the decoder lacks SBR or parametric stereo.
  • Chapters: open sample-chapters.m4a in a podcast or audiobook app; you should see three chapters at 0, 5 and 10 seconds. ffprobe -show_chapters lists them too.
  • Lossless round trip: decode sample-alac.m4a to WAV and compare the samples with our 4-second WAV sample. They should be identical.
  • Upload limits: sample-1mb.m4a is exactly 1 MiB, so you can test a limit at the boundary.

Free to use for testing, teaching and demos, commercially or not, with no attribution needed. A link back to this page is always appreciated.

Put it online

Have an M4A file? Give it a link.

Drop an M4A on 99helpers and it gets its own address that plays straight in the browser, on any phone or computer, with nothing to install. Share a voice memo, demo or podcast episode as a link.

Questions

M4A files, frequently asked

What is an M4A file?

An audio file in the MP4 container, usually compressed with AAC, sometimes stored losslessly with Apple Lossless (ALAC). It's the format of iTunes purchases, iPhone voice memos and many podcasts.

Is M4A better than MP3?

With AAC inside, yes: it sounds better than MP3 at the same bit rate, seeks precisely and supports gapless playback. MP3 still wins on compatibility with very old devices.

Is M4A lossless?

It depends on the codec inside. Most M4A files use AAC, which is lossy. An M4A with ALAC (Apple Lossless) is lossless. A player's info panel or ffprobe tells you which.

What's the difference between M4A and MP4?

None in the format. M4A is an MP4 file with only audio; Apple introduced the extension so audio and video files could be told apart. Renaming one to the other doesn't change the file.

What's the difference between M4A and AAC?

AAC is the codec. An .aac file is raw AAC frames with small headers; an .m4a puts the same frames in an MP4 container, adding an index, tags, cover art and gapless information.

Can browsers play M4A files?

Yes, M4A files with AAC audio play in every current browser. ALAC M4A files play in Safari, but support in other browsers varies, so use AAC for the web.

What is an M4B file?

An audiobook in the same format as M4A. The different extension tells Apple's apps to remember your place and show chapters. You can rename it to .m4a and it still plays.

How do I convert M4A to MP3?

Use a converter app, Audacity, or FFmpeg: ffmpeg -i in.m4a -c:a libmp3lame -q:a 2 out.mp3. AAC to MP3 is a lossy-to-lossy conversion, so use a good bit rate.

Related formats

Other file types explained

Keep going

Related

Sources

Last reviewed 27 October 2026.