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.
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.
MIME types are organized into several top-level categories. Here are the most commonly encountered ones:
| MIME Type | Extension | Description |
|---|---|---|
text/html | .html, .htm | HTML documents |
text/css | .css | CSS stylesheets |
text/plain | .txt | Plain text files |
text/csv | .csv | Comma-separated values |
text/xml | .xml | XML documents |
text/javascript | .js, .mjs | JavaScript files |
| MIME Type | Extension | Description |
|---|---|---|
image/jpeg | .jpg, .jpeg | JPEG images |
image/png | .png | PNG images |
image/gif | .gif | GIF images |
image/svg+xml | .svg | SVG vector graphics |
image/webp | .webp | WebP images |
image/avif | .avif | AVIF images |
| MIME Type | Extension | Description |
|---|---|---|
application/json | .json | JSON data |
application/pdf | PDF documents | |
application/zip | .zip | ZIP archives |
application/xml | .xml | Generic XML |
application/octet-stream | (any) | Unknown binary data |
application/wasm | .wasm | WebAssembly |
| MIME Type | Extension | Description |
|---|---|---|
audio/mpeg | .mp3 | MP3 audio |
audio/ogg | .ogg | OGG audio |
audio/wav | .wav | WAV audio |
video/mp4 | .mp4 | MP4 video |
video/webm | .webm | WebM video |
video/mp2t | .ts | MPEG transport stream |
| MIME Type | Extension | Description |
|---|---|---|
font/woff2 | .woff2 | WOFF 2.0 fonts |
font/woff | .woff | WOFF fonts |
font/ttf | .ttf | TrueType fonts |
font/otf | .otf | OpenType fonts |
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.
Setting the wrong MIME type can cause a cascade of problems:
application/octet-stream for an image, the browser will download it instead of showing it inline.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.
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
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
Most web servers come with preconfigured MIME type mappings, but you may need to add custom ones or fix incorrect defaults.
Add or modify MIME types in .htaccess or the server configuration:
AddType application/wasm .wasm
AddType font/woff2 .woff2
AddType image/webp .webp
Use the types directive in your server block:
types {
application/wasm wasm;
font/woff2 woff2;
image/webp webp;
}
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')
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.
As the web evolves, new file formats require new MIME types. Some relatively recent additions worth knowing:
image/avif — AVIF images (next-gen compression, better than WebP)image/jxl — JPEG XL images (even better compression)font/woff2 — WOFF2 web fonts (smaller than WOFF1)application/manifest+json — Web app manifestsapplication/wasm — WebAssembly modulestext/event-stream — Server-Sent EventsIf 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.
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.
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.
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.
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.
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.
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.