Free M4A test files and sample generator

MPEG-4 audio container (usually AAC); the default for Apple Music and Voice Memos.

Generate a .m4a file →

What is a .m4a file?

M4A: MPEG-4 Audio. M4A is AAC audio inside an MP4 container, and it is what Apple Music, iTunes and iPhone Voice Memos produce. The container is what separates it from a bare .aac stream: an MP4 carries a sample table describing exactly where every frame sits and how long it lasts, so a player can seek instantly and report an accurate duration without scanning the file. The same box structure holds cover art and tags, which is why music libraries prefer it. The extension is a convention rather than a format, an .m4a and an .mp4 are the same container, distinguished only by whether there is a video track.

Why generate a test M4A file?

What you can put inside a .m4a file

You get 4 content options for M4A, so the file holds something meaningful rather than random padding: Silence, Tone (beep), Noise, Voice (synthetic). For M4A these are alternatives, so choose the one that matches what you need to test.

How a .m4a file is identified

Every .m4a file begins at offset 4 with 66 74 79 70, "ftyp" at offset 4, the file type box, preceded by its own 4-byte length. That is what a validator inspecting content rather than the file name looks for.

How the size lands on the exact byte

ISO base media files are a tree of boxes, and a `free` box is defined as ignorable, so the padding goes in one.

Negative testing with broken M4A files

Which failure to reach for, and what to assert for each, is covered in how to make a corrupted file for testing. For upload limits and type checks see testing file upload validation.

Sample M4A content

[Binary audio], AAC-LC in an MP4 container, 128 kbps, 48 kHz mono.

This shows the shape of the file. Your download is generated fresh at the size you choose, so the values will differ.

How to open and verify the file

Play it in any media player, or dump the box tree with `ffprobe -v trace file.m4a`. Windows File Explorer shows the duration in its details pane, which only appears if a real parser read the sample table.

Media type audio/mp4 · extension .m4a · category Audio

Generate a .m4a file → · questions about sizes, privacy or cost are answered on the site FAQ.

Frequently asked questions about M4A files

What identifies a .m4a file?

A .m4a file begins at offset 4 with the bytes 66 74 79 70, "ftyp" at offset 4, the file type box, preceded by its own 4-byte length. Those bytes are what a content-sniffing validator looks for, and what the Corrupted condition destroys.

How can a .m4a file be an exact number of bytes?

ISO base media files are a tree of boxes, and a `free` box is defined as ignorable, so the padding goes in one.

What can go inside the M4A file?

There are 4 content options for .m4a: Silence, Tone (beep), Noise, Voice (synthetic). For M4A these are alternatives, so pick the one matching what you need to test.

Can I download several broken M4A files at once?

Yes, select more than one File Condition and you get one ZIP containing a .m4a per condition, each named after its condition.

Can the M4A file use UTF-16 or a byte-order mark?

No, and deliberately. A .m4a file is a container rather than plain text, so rewriting its bytes as UTF-16 would not produce a UTF-16 document. It would produce a broken file. Use a text format such as CSV, JSON or XML for encoding tests.

How do I open or verify the M4A file?

Play it in any media player, or dump the box tree with ffprobe -v trace file.m4a. Windows File Explorer shows the duration in its details pane, which only appears if a real parser read the sample table.

Related Audio formats

MP3 · WAV · FLAC · AAC · OGG · AIFF · AU · MIDI

Browse all file formats →