MIME Types Reference

multipart/form-data

The MIME type for submitting forms containing files, binary data, and mixed content.

What Is This?

The multipart/form-data MIME type is used for HTML form submissions that include files, binary data, or non-ASCII text. Unlike application/x-www-form-urlencoded (which URL-encodes all values), multipart/form-data encodes each form field as a separate part in a multipart message, allowing efficient binary file transfer.

Common Uses

1

HTML forms with file upload <input type='file'> fields

2

REST API endpoints accepting file uploads

3

Email attachments (though with different multipart subtypes)

4

Batch data submission with mixed content types

Examples

Browser Support

Supported by all browsers. Standard encoding for HTML forms with enctype='multipart/form-data'.

File Extension

The (none) file extension maps to multipart/form-data as its MIME type.

Frequently Asked Questions

When should I use multipart/form-data vs application/x-www-form-urlencoded?

Use multipart/form-data when your form includes file uploads or binary data. Use application/x-www-form-urlencoded for simple text-only forms. multipart/form-data is more efficient for binary data because it avoids base64 encoding overhead.

How does the boundary parameter work?

The boundary parameter is a unique string that separates each part of a multipart message. The server uses it to parse the individual form fields and files. Browsers generate a unique boundary automatically.