application/octet-stream
applicationThe generic binary data MIME type. Used when no more specific type is known or appropriate. Browsers receiving application/octet-stream will typically trigger a file download dialog rather than attempting to display the content. Used for binary API payloads and file download endpoints.
Details
application/octet-stream is the 'catch-all' for binary data. RFC 2046 §4.5.1 defines it as the default subtype for application.
When to use: - File download endpoints where you want browser to trigger download - Binary API payloads (custom binary protocols over HTTP) - Responses where the specific format is unknown or variable
When NOT to use: - When you know the specific type – use it (image/jpeg, application/pdf) - File uploads where the server needs to validate file type
Content-Disposition header pairing: typically sent with Content-Disposition: attachment;filename="file.zip" to specify the download filename.
Security: sending application/octet-stream for known dangerous types (JavaScript, HTML) prevents execution in browser but should not be relied on as a security control – use X-Content-Type-Options: nosniff.
Common use
File download endpoints, binary API payloads, unknown binary data