MIME Types

application/octet-stream

The generic MIME type for arbitrary binary data, often used for unknown file types or forced downloads.

What Is This?

The application/octet-stream MIME type is the catch-all for arbitrary binary data. When a browser receives this content type, it typically triggers a download dialog rather than trying to display the content. It is used when the server does not know the specific file type or when you want to force a download regardless of the content.

Common Uses

1

Common Use

Forcing file downloads regardless of content type

2

Common Use

Serving files with unknown or uncommon extensions

3

Common Use

Binary data streams in API responses

4

Common Use

Executable files and installers

Examples

Server Configuration

Serve files with the application/octet-stream MIME type:

# Nginx
location ~ \. (binary)$ {
  add_header Content-Type "application/octet-stream";
}

# Apache
AddType application/octet-stream * (binary)
HTML Usage

Use this MIME type in HTML or HTTP:

Content-Type: application/octet-stream

<!-- HTML reference -->
<link rel="preload" href="file* (binary)" as="fetch" crossorigin>

Related Entries

More from this reference:

Frequently Asked Questions

Should I use application/octet-stream for all downloads?

No. Use the specific MIME type when possible (e.g., application/pdf, image/png) so browsers can handle the content appropriately. Use application/octet-stream only when the file type is unknown or when you explicitly want to force a download.

Does application/octet-stream affect security?

Yes. Some browsers and security scanners treat application/octet-stream downloads with extra caution because it indicates unknown content. Always serve known file types with their correct MIME types for better user experience.