devkult_
tools29converters34
home/mime/.m4a

.m4a MIME type

MPEG-4 audio (AAC)audio

audio/mp4

AAC or ALAC audio in an MPEG-4 container — the format of iTunes and many podcasts.

MIME typeaudio/mp4
Extensions.m4a
Also seen asaudio/x-m4a
Content-Typeaudio/mp4
Compress in transit?No — already compressed
File signature66 74 79 70 (ftyp) at offset 4
an ISO base media file; the brand after ftyp is typically M4A

Good to know

  • Apple software often reports audio/x-m4a; the registered type is audio/mp4.

Serve .m4a files with the right type

The response header to send:

Content-Type: audio/mp4

Most servers pick the type from the file extension. If yours sends the wrong one, map it explicitly:

nginx (inside the types block in mime.types)
audio/mp4 m4a;
Apache (.htaccess or server config)
AddType audio/mp4 .m4a
Express
res.set("Content-Type", "audio/mp4");
Python
import mimetypes

mimetypes.add_type("audio/mp4", ".m4a")
HTML file input
<input type="file" accept=".m4a,audio/mp4">

Check it

See what a server sends for a file, and what type a local file really is by its contents:

curl -sI https://example.com/file.m4a | grep -i '^content-type:'
file --mime-type file.m4a

Frequently asked questions

What is the MIME type for .m4a files?

audio/mp4. You may also see audio/x-m4a, but audio/mp4 is the one to send.

What Content-Type header should a .m4a file be served with?

Content-Type: audio/mp4. It's already compressed, so servers shouldn't gzip it.

How can I tell if a file is really a .m4a?

Check its bytes rather than the extension: M4A files contain 66 74 79 70 (ftyp) at byte offset 4 — an ISO base media file; the brand after ftyp is typically M4A . On the command line, file --mime-type name.m4a does this for you.

Related types

Headers that go with it: Content-Type · Content-Disposition · X-Content-Type-Options