devkult_
tools30converters34
home/mime/.weba

.weba MIME type

WebM audioaudio

audio/webm

Audio-only WebM, usually with Opus inside. Recordings are often saved as .webm even when they have no video.

MIME typeaudio/webm
Extensions.weba
Content-Typeaudio/webm
Compress in transit?No — already compressed
File signature1A 45 DF A3
the EBML header shared by WebM and Matroska

Good to know

  • Chromium's MediaRecorder records audio as audio/webm;codecs=opus by default, while Safari has historically recorded MP4. Check MediaRecorder.isTypeSupported() rather than assuming a type.
  • When you upload a recording, send the Blob's own type as the Content-Type instead of hard-coding one.

Serve .weba files with the right type

The response header to send:

Content-Type: audio/webm

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/webm weba;
Apache (.htaccess or server config)
AddType audio/webm .weba
Express
res.set("Content-Type", "audio/webm");
Python
import mimetypes

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

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.weba | grep -i '^content-type:'
file --mime-type file.weba

Frequently asked questions

What is the MIME type for .weba files?

audio/webm.

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

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

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

Check its bytes rather than the extension: WEBA files start with 1A 45 DF A3 — the EBML header shared by WebM and Matroska. On the command line, file --mime-type name.weba does this for you.

Related types

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