Media type · application/octet-stream
application/octet-stream
application/octet-stream is the generic media type for arbitrary binary data with no more specific type.
Key facts
| Type | application/octet-stream |
|---|---|
| Extensions | .bin and others |
| Standard | RFC 2046; IANA registry |
| Text or binary | Binary |
| Browser behavior | Downloads the response |
What it means
The server is saying it does not know a more specific type, or it deliberately wants the client to treat the bytes as an opaque blob. Browsers respond by downloading the file instead of rendering it. It is appropriate for unknown binaries and for endpoints that intentionally stream opaque data.
Why it causes bugs
Using it for images, PDFs or HTML breaks the expected behavior: images may download instead of displaying, and pages may never render. With nosniff, browsers refuse to reinterpret a generic binary as a script or stylesheet. If you know the format, send its real type; leave octet-stream for genuinely unknown content.
Frequently asked questions
Why does my image download instead of showing?
The server is probably sending application/octet-stream. Send image/png, image/jpeg or the matching image type so the browser can display it inline.
Is application/octet-stream safe?
It is safe in the sense that browsers download rather than execute it, but it says nothing about the content. Pair it with Content-Disposition and validate uploads on the server.