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

Typeapplication/octet-stream
Extensions.bin and others
StandardRFC 2046; IANA registry
Text or binaryBinary
Browser behaviorDownloads 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.

New tools, straight to your inbox

One short email when we add tools worth using. No spam, unsubscribe anytime.