Last updated
Looking Up a MIME Type by File Extension
Search the database by extension to find the correct MIME type:
Extension: .webp
MIME Type: image/webp
Category: Image
Description: WebP is a modern image format providing superior compression for web images
Associated extensions: .webp
Browser support: Chrome 17+, Firefox 65+, Edge 18+, Safari 14+
Deprecated alternatives: none
Extension: .wasm
MIME Type: application/wasm
Category: Application
Description: WebAssembly binary format for high-performance web applications
Associated extensions: .wasm
Browser support: All modern browsers
Security note: Executes compiled code in the browser sandbox
Looking Up a File Format by MIME Type
Search by MIME type string to find what formats it represents:
MIME Type: application/vnd.ms-excel
File format: Microsoft Excel (legacy)
Associated extensions: .xls, .xlt, .xla
Recommended replacement: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet (.xlsx)
Note: This is the legacy binary format; use the OOXML type for modern Excel files
MIME Type: application/octet-stream
Description: Generic binary data — used as a fallback for unknown binary file types
Common uses: Forcing file downloads, serving binary files with no specific type
Note: Browsers will download files served with this type rather than display them
Generating a Content-Type Header
The finder generates complete HTTP header strings ready to copy:
# For a JSON API response
Content-Type: application/json; charset=utf-8
# For an HTML page
Content-Type: text/html; charset=utf-8
# For a CSV file download
Content-Type: text/csv; charset=utf-8
Content-Disposition: attachment; filename="export.csv"
# For a multipart form upload
Content-Type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW
# For a plain text file
Content-Type: text/plain; charset=utf-8
The charset parameter is automatically included for text-based types. Copy the header directly into your server config or application code.
Configuring MIME Types in Web Servers
Use the finder to get the correct type, then add it to your server config:
# Apache .htaccess — add MIME types for modern formats
AddType application/wasm .wasm
AddType image/webp .webp
AddType image/avif .avif
AddType font/woff2 .woff2
AddType application/manifest+json .webmanifest
# Nginx mime.types additions
types {
application/wasm wasm;
image/webp webp;
image/avif avif;
font/woff2 woff2;
application/manifest+json webmanifest;
}
Without these entries, servers fall back to application/octet-stream, causing browsers to download files instead of using them correctly.
File Upload Validation Reference
The finder explains how to validate uploaded files correctly:
// WRONG — extension can be spoofed
if (file.name.endsWith('.jpg')) { /* allow */ }
// BETTER — check declared MIME type (still spoofable by client)
if (file.type === 'image/jpeg') { /* allow */ }
// BEST — check magic bytes on the server
// JPEG magic bytes: FF D8 FF
// PNG magic bytes: 89 50 4E 47
// PDF magic bytes: 25 50 44 46
// ZIP magic bytes: 50 4B 03 04
The finder lists magic byte signatures for each file type, giving you the data needed to implement reliable server-side validation.
Preventing MIME Sniffing Attacks
Some browsers ignore the declared Content-Type and sniff the actual content. Prevent this with a response header:
# Add to all responses to prevent MIME sniffing
X-Content-Type-Options: nosniff
The finder flags which MIME types are subject to sniffing. For example, a file served as text/plain might be sniffed as text/html and execute embedded scripts. The nosniff header forces browsers to respect the declared Content-Type.
Multipart MIME Types Explained
The finder provides detailed explanations of multipart types:
MIME Type: multipart/form-data
Use case: HTML form submissions with file uploads
Required parameter: boundary (unique string separating parts)
Example:
Content-Type: multipart/form-data; boundary=----FormBoundary
MIME Type: multipart/mixed
Use case: Email messages with attachments
Each part has its own Content-Type header
MIME Type: multipart/alternative
Use case: Email with both plain text and HTML versions
Client displays the most capable version it supports
Deprecated MIME Types to Avoid
The finder flags outdated types and their modern replacements:
text/javascript→ useapplication/javascript(though browsers accept both)application/x-javascript→ useapplication/javascriptimage/x-png→ useimage/pngapplication/x-www-form-urlencoded→ still current for simple form submissionsapplication/vnd.ms-excel→ useapplication/vnd.openxmlformats-officedocument.spreadsheetml.sheetfor .xlsxapplication/x-zip-compressed→ useapplication/zip
API Content Negotiation
REST APIs use MIME types in Accept and Content-Type headers for content negotiation:
# Client requests JSON response
GET /api/users/123
Accept: application/json
# Client sends JSON body
POST /api/users
Content-Type: application/json
{"name": "[name]", "email": "[email]"}
# Client requests XML response
GET /api/users/123
Accept: application/xml
# Client uploads a file
POST /api/documents
Content-Type: multipart/form-data; boundary=----Boundary
Use the finder to verify the exact MIME type strings for your API documentation and implementation.
Font and Media MIME Types
Modern web fonts and media formats have specific MIME types:
Font formats:
.woff → font/woff
.woff2 → font/woff2
.ttf → font/ttf
.otf → font/otf
Video formats:
.mp4 → video/mp4
.webm → video/webm
.ogv → video/ogg
Audio formats:
.mp3 → audio/mpeg
.ogg → audio/ogg
.wav → audio/wav
.aac → audio/aac
.flac → audio/flac
Serving fonts with the correct MIME type is required for cross-origin font loading to work correctly in browsers.