Aarunya AppsAarunya Apps
application/octet-stream

application/octet-stream MIME Type — Binary Downloads & Unknown Files

The default MIME type for arbitrary binary data. Used when no more specific type is known or appropriate. Browsers typically treat this as a file download rather than attempting to display it.

Type
application
Compressible
No (pre-compressed)

Used For

  • Unknown file downloads
  • Proprietary binary formats
  • Forcing a download instead of browser display
  • Raw binary data transfer

HTTP Header Example

HTTP/1.1 200 OK
Content-Type: application/octet-stream
Content-Disposition: attachment; filename="data.bin"

[binary data]

Code Examples

// Force file download (unknown binary type)
app.get('/download/:file', (req, res) => {
  res
    .set('Content-Type', 'application/octet-stream')
    .set('Content-Disposition', `attachment; filename="${req.params.file}"`)
    .sendFile(`/exports/${req.params.file}`)
})

// When file type is known, prefer the specific MIME type:
// PDF → application/pdf
// ZIP → application/zip
// PNG → image/png

Related MIME Types

All MIME Types

Browse the complete MIME type reference.

View All MIME Types

Frequently Asked Questions

What is the application/octet-stream MIME type?

The default MIME type for arbitrary binary data. Used when no more specific type is known or appropriate. Browsers typically treat this as a file download rather than attempting to display it.

When should I set Content-Type: application/octet-stream?

Set Content-Type: application/octet-stream on HTTP responses that contain Binary Data data. Unknown file downloads.

What file extensions use application/octet-stream?

application/octet-stream is a format type rather than a file extension — it's identified by its content structure.

What happens if I serve this with the wrong Content-Type?

Browsers use the Content-Type header to decide how to handle the response. Serving application/octet-stream content with an incorrect MIME type can cause browsers to display it incorrectly, refuse to execute it (scripts), or prompt an unintended download. Modern browsers respect X-Content-Type-Options: nosniff and will not attempt to auto-detect the type.