DevKits

application/*

application/wasm

File extensions: .wasm

WebAssembly binary module — near-native code for the web.

What is application/wasm?

application/wasm is the media type for WebAssembly binary modules. Setting it correctly is required for the browser's streaming compilation via WebAssembly.instantiateStreaming — with a wrong type the browser falls back to slower path.

Typical usage

Games, image/video processing, cryptography libraries, ports of C/C++/Rust code.

Common gotchas

If you serve .wasm files without this type (e.g. as application/octet-stream), instantiateStreaming throws a TypeError. Configure your server to map .wasm → application/wasm.

HTTP header example

Response header

Content-Type: application/wasm; charset=utf-8

Reference

W3C WebAssembly

Frequently asked questions

What is the application/wasm MIME type?

application/wasm is the media type for WebAssembly binary modules. Setting it correctly is required for the browser's streaming compilation via WebAssembly.instantiateStreaming — with a wrong type the browser falls back to slower path.

What file extension does application/wasm use?

Files served as application/wasm typically use the extension .wasm. The most common is .wasm.

How do I set the Content-Type for application/wasm?

Send the HTTP response header Content-Type: application/wasm; charset=utf-8. Games, image/video processing, cryptography libraries, ports of C/C++/Rust code.

Is application/wasm an official MIME type?

Yes. application/wasm is officially registered with IANA (W3C WebAssembly), so standards-conformant clients recognize it.

What are common mistakes with application/wasm?

If you serve .wasm files without this type (e.g. as application/octet-stream), instantiateStreaming throws a TypeError. Configure your server to map .wasm → application/wasm.

Related MIME types