devkult_
tools29converters34
home/mime/.bin

.bin MIME type

Binary dataapps & binaries

application/octet-stream

Arbitrary binary data — the fallback type for anything without a more specific one.

MIME typeapplication/octet-stream
Extensions.bin
Content-Typeapplication/octet-stream
Compress in transit?No — already compressed

Good to know

  • Browsers download application/octet-stream responses instead of displaying them.
  • Many servers use it as the default for unknown extensions; nginx's default_type sets it.
  • Under nosniff, a script or stylesheet served as application/octet-stream is blocked.

Serve .bin files with the right type

The response header to send:

Content-Type: application/octet-stream

Most servers pick the type from the file extension. If yours sends the wrong one, map it explicitly:

nginx (inside the types block in mime.types)
application/octet-stream bin;
Apache (.htaccess or server config)
AddType application/octet-stream .bin
Express
res.set("Content-Type", "application/octet-stream");
Python
import mimetypes

mimetypes.add_type("application/octet-stream", ".bin")
HTML file input
<input type="file" accept=".bin,application/octet-stream">

Check it

See what a server sends for a file, and what type a local file really is by its contents:

curl -sI https://example.com/file.bin | grep -i '^content-type:'
file --mime-type file.bin

Frequently asked questions

What is the MIME type for .bin files?

application/octet-stream.

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

Content-Type: application/octet-stream. It's already compressed, so servers shouldn't gzip it.

Related types

Headers that go with it: Content-Type · Content-Disposition · X-Content-Type-Options