MIME Type
A standardised label that identifies the type and format of a file, used by web servers and browsers to handle files correctly.
Last updated
What Is a MIME Type?
MIME (Multipurpose Internet Mail Extensions) type is a standardised two-part identifier for file formats on the internet, in the form type/subtype. Originally designed for email attachments (hence "Mail" in the name), MIME types are now the universal standard for identifying content types in HTTP responses, file upload APIs, and operating system file handlers.
Format
type/subtype
Examples:
application/pdf— a PDF documentimage/jpeg— a JPEG imagetext/html— an HTML webpageapplication/zip— a ZIP archive
Common MIME Types Reference
| File Extension | MIME Type |
|---|---|
| application/pdf | |
| .jpg / .jpeg | image/jpeg |
| .png | image/png |
| .webp | image/webp |
| .gif | image/gif |
| .svg | image/svg+xml |
| .zip | application/zip |
| .docx | application/vnd.openxmlformats-officedocument.wordprocessingml.document |
| .xlsx | application/vnd.openxmlformats-officedocument.spreadsheetml.sheet |
| .mp4 | video/mp4 |
| .mp3 | audio/mpeg |
| .json | application/json |
| .csv | text/csv |
Why MIME Types Matter
When a web server sends a file, it includes the MIME type in the Content-Type HTTP header. The browser uses this — not the file extension — to decide how to handle the response: display it inline (images, PDFs), trigger a download, or pass it to a plugin.
A mismatch between the MIME type and file content causes errors: a PDF served with text/html will appear as garbled text instead of being displayed by the PDF viewer.