MIME Type Checker: Find MIME Types for Any File Extension

April 13, 20269 min readDeveloper Tools

Look up MIME types for any file extension instantly — search, browse, or upload a file.

Check MIME Types →

Every file you encounter on the web — whether it's a webpage, an image, a video, or a downloadable document — has a MIME type associated with it. MIME (Multipurpose Internet Mail Extensions) types tell browsers, email clients, and servers how to interpret and handle different kinds of content. Getting MIME types wrong can cause files to download instead of display, images to break, or security warnings to appear. This guide explains everything you need to know about MIME types and how to find the right one for any file.

What Are MIME Types?

MIME types are standardized identifiers used to indicate the nature and format of a file or piece of data. Originally designed for email systems (hence the name), MIME types became the standard way to identify content on the web through HTTP headers. Every time your browser loads a webpage, the server sends a Content-Type header with the appropriate MIME type, telling the browser whether it's receiving HTML, JSON, an image, a video, or something else entirely.

A MIME type consists of two parts separated by a slash: the type and the subtype. For example, text/html means "text type, HTML subtype," and image/png means "image type, PNG subtype." This two-level hierarchy provides both a broad category and a specific format within that category.

Common MIME Type Categories

MIME types are organized into several top-level categories. Here are the most commonly encountered ones:

text/ — Text-Based Content

MIME TypeExtensionDescription
text/html.html, .htmHTML documents
text/css.cssCSS stylesheets
text/plain.txtPlain text files
text/csv.csvComma-separated values
text/xml.xmlXML documents
text/javascript.js, .mjsJavaScript files

image/ — Image Files

MIME TypeExtensionDescription
image/jpeg.jpg, .jpegJPEG images
image/png.pngPNG images
image/gif.gifGIF images
image/svg+xml.svgSVG vector graphics
image/webp.webpWebP images
image/avif.avifAVIF images

application/ — Application-Specific Formats

MIME TypeExtensionDescription
application/json.jsonJSON data
application/pdf.pdfPDF documents
application/zip.zipZIP archives
application/xml.xmlGeneric XML
application/octet-stream(any)Unknown binary data
application/wasm.wasmWebAssembly

audio/ and video/ — Multimedia

MIME TypeExtensionDescription
audio/mpeg.mp3MP3 audio
audio/ogg.oggOGG audio
audio/wav.wavWAV audio
video/mp4.mp4MP4 video
video/webm.webmWebM video
video/mp2t.tsMPEG transport stream

font/ — Web Fonts

MIME TypeExtensionDescription
font/woff2.woff2WOFF 2.0 fonts
font/woff.woffWOFF fonts
font/ttf.ttfTrueType fonts
font/otf.otfOpenType fonts

How MIME Types Work in HTTP

When a browser requests a file from a web server, the server includes the MIME type in the HTTP response headers:

HTTP/1.1 200 OK
Content-Type: text/html; charset=UTF-8
Content-Length: 4567

<!DOCTYPE html>...

The browser reads the Content-Type header to decide how to process the response. If it receives text/html, it renders the page. If it receives application/pdf, it opens the PDF viewer. If it receives application/octet-stream, it prompts the user to download the file.

Similarly, when you upload a file or submit a form, the browser sends the MIME type in the request:

Content-Type: multipart/form-data; boundary=----WebKitFormBoundary
Content-Type: image/png  (for each file part)

This tells the server what kind of file it's receiving, allowing it to validate and process the upload correctly.

Why Correct MIME Types Matter

Setting the wrong MIME type can cause a cascade of problems:

How to Find the MIME Type for Any File Extension

Using RiseTop's MIME Type Checker

The quickest way to find a MIME type is with RiseTop's MIME Type Checker. You can search by file extension (e.g., ".webp"), browse the full list organized by category, or even upload a file to detect its MIME type automatically. The tool covers hundreds of file types, including common web formats, document types, archives, and specialized formats.

Using Command Line

On Linux and macOS, the file command detects MIME types based on file content (not just the extension):

# Detect MIME type by content
file --mime-type document.pdf
# Output: document.pdf: application/pdf

# List all MIME type mappings
cat /etc/mime.types

On Windows, PowerShell provides basic MIME type detection:

Add-Type -AssemblyName System.Web
[System.Web.MimeMapping]::GetMimeMapping("document.pdf")
# Output: application/pdf

Checking HTTP Response Headers

To verify what MIME type a server is actually sending for a file, use curl:

curl -I https://example.com/image.png
# Look for: Content-Type: image/png

Setting MIME Types on Your Server

Most web servers come with preconfigured MIME type mappings, but you may need to add custom ones or fix incorrect defaults.

Apache

Add or modify MIME types in .htaccess or the server configuration:

AddType application/wasm .wasm
AddType font/woff2 .woff2
AddType image/webp .webp

Nginx

Use the types directive in your server block:

types {
    application/wasm wasm;
    font/woff2      woff2;
    image/webp      webp;
}

Programmatic (Node.js, Python, etc.)

When serving files from application code, always set the Content-Type header explicitly:

// Node.js (Express)
res.setHeader('Content-Type', 'application/pdf');
res.send(pdfBuffer);

// Python (Flask)
from flask import send_file
send_file('document.pdf', mimetype='application/pdf')

MIME Type Security: nosniff Header

The X-Content-Type-Options: nosniff HTTP header instructs browsers to strictly respect the declared MIME type and not attempt to "sniff" or guess the actual content type. This prevents certain types of attacks where an attacker could upload a malicious HTML file disguised as an image. When nosniff is set, the browser will refuse to render the file if the MIME type doesn't match the actual content.

# Apache
Header set X-Content-Type-Options "nosniff"

# Nginx
add_header X-Content-Type-Options "nosniff" always;

This header is included in most security best practices and is recommended for all websites. It's one of the simplest and most effective security headers you can add.

MIME Types for Modern Web Formats

As the web evolves, new file formats require new MIME types. Some relatively recent additions worth knowing:

If your server doesn't recognize these newer MIME types, files may be served as application/octet-stream, causing them to download instead of functioning as intended. Always verify that your server's MIME type configuration includes the formats your site uses.

Conclusion

MIME types are one of those behind-the-scenes technologies that silently make the web work. Every image you see, every font that loads, every API response you consume — all of it depends on correct MIME type declarations. Whether you're configuring a web server, debugging a broken file upload, or building an API, knowing the right MIME type for each file format is essential. Bookmark RiseTop's MIME Type Checker as your go-to reference for looking up any MIME type instantly.

Frequently Asked Questions

What is the difference between a MIME type and a file extension?

A file extension (like .pdf or .jpg) is part of the filename that indicates the file type to the operating system and users. A MIME type (like application/pdf or image/jpeg) is a standardized identifier used by internet protocols (HTTP, email) to tell software how to handle the content. They serve similar purposes in different contexts.

Why does my file show 'application/octet-stream' as its MIME type?

application/octet-stream is the default MIME type used when the server cannot determine the specific type of a file. It essentially means 'binary data of unknown type.' To fix this, configure your server to map the file extension to the correct MIME type, or explicitly set the Content-Type header in your application code.

Can incorrect MIME types cause security issues?

Yes. Incorrect MIME types can enable MIME sniffing attacks where browsers interpret content differently than intended. For example, serving an HTML file as text/plain could allow it to be rendered as HTML in certain conditions. Always set accurate MIME types and consider using the X-Content-Type-Options: nosniff header to prevent MIME sniffing.

How do I set MIME types on my web server?

On Apache, use the AddType directive in .htaccess or httpd.conf. On Nginx, use the types directive in nginx.conf. Most servers come with a default MIME types file that covers common extensions. For custom or uncommon file types, you'll need to add the mapping manually.

What is the MIME type for JSON files?

The official MIME type for JSON is application/json. For JSONP (JSON with padding), use application/javascript. Note that some older APIs may still use text/plain for JSON, but application/json is the correct standard registered with IANA.