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
Common Use
Forcing file downloads regardless of content type
Common Use
Serving files with unknown or uncommon extensions
Common Use
Binary data streams in API responses
Common Use
Executable files and installers
Examples
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)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:
application/json
The standard MIME type for JavaScript Object Notation (JSON) data interchange.
application/pdf
The MIME type for PDF (Portable Document Format) documents.
application/zip
The MIME type for ZIP archive files used for compression and bundling.
application/xml
The MIME type for XML documents and data interchange.
application/x-www-form-urlencoded
The MIME type for URL-encoded form data submissions.
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.