What is MIME Type?


MIME (Multipurpose Internet Mail Extensions) type is a standardized way of describing the format of a file. It is used in web browsers, email clients, and servers to understand how to process or display the data they receive.

Structure of a MIME Type

A MIME type has two parts, separated by a forward slash (/):

For example:

Importance of MIME Types

MIME types are important for the following reasons:

Common MIME Types

MIME Type Description Example File Extensions
text/plain Plain text file .txt
text/html HTML document .html, .htm
image/jpeg JPEG image .jpg, .jpeg
application/json JSON data .json
application/pdf PDF document .pdf

How MIME Types Work in HTTP

When a server sends a file to a browser, it includes a Content-Type header in the HTTP response. This header specifies the MIME type of the file, helping the browser understand how to process the content.

Content-Type: text/html