Multipart form data

multipart/form-data

Extensions
none registered
Compressible
no
Status
IANA-registered

How files travel over HTTP: each form field becomes its own part with its own headers, and the parts are separated by a boundary string declared as a parameter on the Content-Type itself. That boundary is the whole trap — it is generated fresh per request, so never set Content-Type manually when sending FormData with fetch or XHR. Do that and the header's boundary won't match the one in the body, and the server parses nothing. Use it for uploads and mixed text-plus-file submissions; flat key-value payloads are smaller as x-www-form-urlencoded.

Defined by RFC 7578 · IANA registration. Registry facts from the IANA media-types registry via mime-db.