# .webm MIME Type: video/webm

> Open video container for VP8, VP9 or AV1 video with Vorbis or Opus audio.

- MIME type: `video/webm`
- Extensions: .webm
- Also seen as: `audio/webm`
- Content-Type header: `video/webm`
- Compress in transit: no (already compressed)
- File signature: `1A 45 DF A3` (the EBML header shared by WebM and Matroska)

## Good to know

- Audio-only WebM files should be served as `audio/webm`.

## Server configuration

### nginx (inside the types block in mime.types)

```
video/webm webm;
```

### Apache (.htaccess or server config)

```
AddType video/webm .webm
```

### Express

```
res.set("Content-Type", "video/webm");
```

### Python

```
import mimetypes

mimetypes.add_type("video/webm", ".webm")
```

### HTML file input

```
<input type="file" accept=".webm,video/webm">
```

## FAQ

### What is the MIME type for .webm files?

`video/webm`. You may also see `audio/webm`, but `video/webm` is the one to send.

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

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

### How can I tell if a file is really a .webm?

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

## Related types

- [.mp4 — video/mp4](https://www.devkult.com/mime/mp4.md)
- [.ogg — audio/ogg](https://www.devkult.com/mime/ogg.md)

Open the interactive page: https://www.devkult.com/mime/webm