# .wasm MIME Type: application/wasm

> WebAssembly binaries. The type is required for streaming compilation.

- MIME type: `application/wasm`
- Extensions: .wasm
- Content-Type header: `application/wasm`
- Compress in transit: yes
- File signature: `00 61 73 6D`

## Good to know

- `WebAssembly.instantiateStreaming()` throws "Incorrect response MIME type. Expected 'application/wasm'" if the server sends anything else.
- Wasm compresses well; serve it with gzip or Brotli.

## Server configuration

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

```
application/wasm wasm;
```

### Apache (.htaccess or server config)

```
AddType application/wasm .wasm
```

### Express

```
res.set("Content-Type", "application/wasm");
```

### Python

```
import mimetypes

mimetypes.add_type("application/wasm", ".wasm")
```

### HTML file input

```
<input type="file" accept=".wasm,application/wasm">
```

## FAQ

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

`application/wasm`.

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

`Content-Type: application/wasm`. It compresses well, so let the server apply gzip or Brotli.

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

Check its bytes rather than the extension: WASM files start with `00 61 73 6D` (`.asm`). On the command line, `file --mime-type name.wasm` does this for you.

## Related types

- [.js — text/javascript](https://www.devkult.com/mime/js.md)
- [.bin — application/octet-stream](https://www.devkult.com/mime/bin.md)

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