What is a MIME Type?

A MIME (Multipurpose Internet Mail Extensions) type, also known as a media type, is a label used to identify and classify different types of data on the Internet.

MIME types play a crucial role in web communication by specifying the nature and format of a file or stream of data. They are used in headers of HTTP requests and responses, email systems, and other contexts where it’s important to convey information about the content being transmitted.

MIME Type Elements

A MIME type consists of two parts:

  1. Top-Level Type (or Primary Content Type)
  2. Subtype

Top-Level Type (or Primary Content Type)

This indicates the general category of the data. Common top-level types include:

Common top-level types include:

textTextual information
imageImage data
audioAudio data
videoVideo data
applicationBinary data or data to be processed by an application
multipartA container for multiple parts, often used for email attachments

Subtype

This further refines the definition of the data type within the top-level type.

Here are some examples:

text/plainPlain text.
image/jpegJPEG image
audio/mp3MP3 audio
video/mp4MP4 video
application/pdfPDF document
multipart/form-dataForm data used in HTTP requests

MIME types are standardized and registered with the Internet Assigned Numbers Authority (IANA) to ensure consistency and interoperability. When a server sends a file to a browser, it includes the appropriate MIME type in the Content-Type header of the HTTP response. This header helps the browser interpret and handle the content correctly.

How MIME Types Works

For example, a server might send the following Content-Type header for a JPEG image:

Content-Type: image/jpeg

This informs the browser that the content is in JPEG format, allowing the browser to render it appropriately.

In addition to serving content over the web, MIME types are used in email systems to specify the type of attachments, allowing email clients to handle attachments appropriately based on their types.

Updated on December 13, 2023
Was this article helpful?

Related Articles

Need Support?
Can’t find the answer you’re looking for? Don’t worry we’re here to help!
Email: support@noc.org