What is a MIME Type?
A MIME type is a standardized two-part content label, such as image/png or video/mp4. Software uses it to determine how content should be transported, parsed, displayed, or rejected.
How MIME Types work
A MIME type communicates the intended representation through a top-level type and subtype, optionally followed by parameters. HTTP, email, browsers, and desktop environments use the label to select handlers and apply security behavior. It describes the served or enclosed content rather than guaranteeing that the bytes are valid. Upload and delivery systems compare declarations with inspection results, then set the response label appropriate to the actual representation.
Key facts
- Parameters refine a media type: text commonly uses a charset, while some audio and video container types use a codecs parameter to identify enclosed elementary streams.
- The IANA media types registry spans the standards tree plus vendor (vnd.) and personal (prs.) registration trees; the separate x. tree is reserved for unregistered names, but a legacy x- prefix does not place a name there (application/x-www-form-urlencoded is registered), and any unregistered label, prefixed or not, may behave inconsistently across clients.
- Browsers may sniff content when a declaration is absent or ambiguous. The X-Content-Type-Options: nosniff response header restricts that behavior in security-sensitive contexts.
When MIME Types matter
Compare declared and detected MIME types before routing or accepting uploaded files. Trusting only a filename or client-supplied label can send disguised content to an unsafe or incompatible parser.