MultipartText-based

multipart/alternative

Alternative Content

Reference for multipart/alternative, the MIME type for messages offering the same content in different formats.

MIME Type Detector

Drop a file to detect its MIME type — no upload, runs in your browser

📄

Drop any file here or click to choose

HTTP Content-Type Header

HTTP Header
Content-Type: multipart/alternative; charset=utf-8

Quick Facts

MIME Typemultipart/alternative
CategoryMultipart
TypeText-based (human-readable)

Common Usage

multipart/alternative presents the same content in multiple formats, with the recipient choosing the best one. The most common use is email that provides both text/plain and text/html versions of the same message, allowing clients to display whichever format they support best.

Code Examples

HTML
<!-- Set MIME type in meta or fetch headers -->
<meta http-equiv="Content-Type" content="multipart/alternative">
Node.js
// Express.js
app.get('/file', (req, res) => {
  res.type('multipart/alternative');
  res.send(data);
});

// Node.js http
res.writeHead(200, { 'Content-Type': 'multipart/alternative' });
nginx
# nginx.conf — add to types block or use default
types {
    multipart/alternative  alternative;
}

# Or set for a specific location
location /api/ {
    default_type multipart/alternative;
}

Related MIME Types

More Multipart MIME Types

Other multipart types in the Multipart family

Related Tools

Explore More MIME Types

Browse our complete reference of 185 MIME types with usage examples, HTTP headers, and code snippets.