MIME Type Reference

200+ MIME types with file extensions, browser support, and category filter

πŸ”
MIME Type Extensions Category Description Browser

What is MIME Type Reference?

MIME Type Reference is a searchable database of Media Type (MIME type) strings. Look up file extensions to find their MIME type (e.g., .pdf β†’ application/pdf), or search by MIME type to find which file extensions use it. Each entry includes the IANA registration status, whether the type is text or binary, common uses, and the appropriate HTTP Content-Type header value including charset where applicable.

MIME (Multipurpose Internet Mail Extensions) types, formally called Media Types, are strings that identify the format of data. They have the format: type/subtype (e.g., text/html, image/png, application/json). The type is one of: text, image, audio, video, application, multipart, font, model, or message. Subtype is the specific format. An optional ;parameter follows (e.g., charset=UTF-8 for text types, boundary for multipart).

MIME types are used in: HTTP Content-Type response headers (tells the browser what the response data is), HTTP Accept request headers (tells the server what the client can accept), HTML <link type=""> and <script type="">, multipart form data (file upload content types), email attachments, and browser download handling. Setting the wrong MIME type can cause security issues (MIME sniffing), display issues (browser renders instead of downloads), or broken responses.

How to Use

  1. Search by file extension (e.g., '.mp4', '.xlsx') to find the MIME type.
  2. Search by MIME string (e.g., 'application/json') to see related file extensions.
  3. Filter by category: text, image, audio, video, application.
  4. Click any entry to see the full Content-Type header value with charset/parameters.
  5. Use the 'HTTP headers' tab to see examples of Accept and Content-Type headers.

Examples

Get Content-Type for JSON API

Result: application/json; charset=UTF-8 (use in HTTP Content-Type response header)

File upload type checking

Result: .xlsx β†’ application/vnd.openxmlformats-officedocument.spreadsheetml.sheet

Video streaming header

Result: .mp4 β†’ video/mp4 (for HTTP video streaming with Range request support)

Frequently Asked Questions

What is the difference between Content-Type and Accept headers?

Content-Type (response): the server sends this to tell the client what format the response body is in. Example: Content-Type: application/json tells the browser the response is JSON. Content-Type (request): in POST/PUT, the client sends this to tell the server what format the request body is in. Example: Content-Type: application/x-www-form-urlencoded for HTML form data. Accept (request): the client sends this to tell the server what response formats it can understand. Example: Accept: application/json means 'please respond with JSON'. The server uses Accept for content negotiation.

What is MIME type sniffing and why is it a security risk?

MIME type sniffing is when a browser ignores the server's Content-Type header and tries to guess the content type from the actual file bytes. A classic attack: upload a JPEG file that contains JavaScript in its metadata. Without X-Content-Type-Options: nosniff, some browsers would execute the JavaScript if the file is linked as a script. Defense: always send accurate Content-Type headers, and add X-Content-Type-Options: nosniff to all responses. Sniffing is also why a server sending text/plain for a .html file might still render the HTML β€” the browser sniffs the DOCTYPE.

What is the MIME type for file uploads in HTML forms?

HTML file upload forms use multipart/form-data encoding (set with enctype='multipart/form-data'). Each file in the form data is a 'part' with its own Content-Type header (the file's MIME type) and Content-Disposition header (the field name and filename). When validating uploads server-side: don't trust the client-provided Content-Type β€” detect the actual file type from the binary header bytes (magic bytes). Libraries: file-type (JavaScript), python-magic (Python), mime-magic (Go). Example: a PNG file starts with bytes 89 50 4E 47 regardless of extension.

What MIME type should I use for JSON APIs?

application/json is the correct MIME type for JSON data. For REST APIs: set Content-Type: application/json in all responses. Set Accept: application/json in all requests. For JSON:API (the spec at jsonapi.org): use application/vnd.api+json. For JSON Patch (RFC 6902): application/json-patch+json. For JSON Merge Patch (RFC 7396): application/merge-patch+json. Always include charset=UTF-8 when serving JSON as text from legacy systems, though modern systems treat application/json as UTF-8 by default (RFC 8259).

What is the MIME type for Excel and other Office files?

Modern Office formats (OOXML, Office Open XML β€” .xlsx, .docx, .pptx): application/vnd.openxmlformats-officedocument.spreadsheetml.sheet (.xlsx), application/vnd.openxmlformats-officedocument.wordprocessingml.document (.docx), application/vnd.openxmlformats-officedocument.presentationml.presentation (.pptx). Legacy binary formats: application/vnd.ms-excel (.xls), application/msword (.doc). ODS/LibreOffice: application/vnd.oasis.opendocument.spreadsheet. These are long strings β€” store them as constants in your code rather than typing them.

Related Tools