Glossary

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 document
  • image/jpeg — a JPEG image
  • text/html — an HTML webpage
  • application/zip — a ZIP archive

Common MIME Types Reference

File ExtensionMIME Type
.pdfapplication/pdf
.jpg / .jpegimage/jpeg
.pngimage/png
.webpimage/webp
.gifimage/gif
.svgimage/svg+xml
.zipapplication/zip
.docxapplication/vnd.openxmlformats-officedocument.wordprocessingml.document
.xlsxapplication/vnd.openxmlformats-officedocument.spreadsheetml.sheet
.mp4video/mp4
.mp3audio/mpeg
.jsonapplication/json
.csvtext/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.