MIME Type Checker
Detect, validate and analyze MIME types from file extensions or content headers with security risk assessment
Updated
What is the MIME Type Checker?
The MIME Type Checker is a comprehensive developer tool for detecting, validating, and analyzing Multipurpose Internet Mail Extensions (MIME) types from file extensions, MIME type strings, or HTTP Content-Type headers.
What is a MIME Type?
A MIME type (also called a media type or content type) is a standardized identifier that describes the nature and format of a file or network resource. Originally developed for email attachments, MIME types are now essential for:
- Web servers to tell browsers what kind of content they're sending
- HTTP requests to declare what data format is being transmitted
- File uploads to validate that received files match expected types
- APIs to negotiate content formats between clients and servers
Every MIME type follows the format type/subtype, such as text/html, image/png, or application/json.
Why Use This Tool?
Unlike basic MIME lookup tables, this tool provides intelligent analysis:
| Feature | Benefit |
|---|---|
| Bidirectional lookup | Search by extension or MIME type interchangeably |
| Content-Type header parsing | Validate and extract parameters from full HTTP headers |
| Security risk assessment | Visual warnings for executable, script, and archive types |
| Server configuration | Copy-paste ready Apache and Nginx directives |
| Smart suggestions | Fuzzy matching catches typos and suggests corrections |
Common Use Cases
Web Developers Verify your server's Content-Type headers are correct for optimal browser compatibility and SEO.
API Engineers Validate request/response content negotiation and ensure proper MIME type handling.
Security Auditors Identify risky file types before allowing uploads or processing user content.
DevOps Engineers Generate accurate server configuration snippets for new file types.
Full-Stack Developers Debug file upload issues by verifying extension-to-MIME mappings.
Supported Type Categories
The tool covers 200+ MIME types across all IANA-registered categories:
- Application — JSON, PDF, archives, executables, office documents
- Audio — MP3, WAV, OGG, FLAC, AAC, WebM audio
- Font — WOFF, WOFF2, TTF, OTF, EOT
- Image — JPEG, PNG, GIF, WebP, SVG, AVIF, TIFF, HEIC
- Message — Email formats (RFC 822)
- Model — 3D formats (glTF, OBJ, STL, COLLADA)
- Multipart — Form data, byte ranges
- Text — HTML, CSS, CSV, Markdown, source code files
- Video — MP4, WebM, AVI, MKV, QuickTime
All types include IANA registration status, common file extensions, and security classifications to help you make informed decisions about file handling.
How it works
Input Analysis
When you enter text into the search field, the tool automatically determines what you're looking for:
Detection Patterns
| Input Pattern | Detected As | Example |
|---|---|---|
| Alphanumeric without slash or semicolon | File extension | json, .png |
type/subtype format without parameters |
MIME type | application/json |
Contains semicolon with key=value |
Content-Type header | text/html; charset=utf-8 |
The tool normalizes your input (lowercase, removes leading dots) and attempts matching in this priority order:
- Exact extension match — Direct lookup in the extension database
- Exact MIME type match — Direct lookup in the MIME type database
- Subtype partial match — For ambiguous input like "json" matching
application/json - Fuzzy suggestions — Levenshtein distance matching for likely typos
The MIME Database
The tool maintains a curated database of 200+ MIME types with comprehensive metadata for each entry:
Per-Type Metadata
| Field | Purpose |
|---|---|
type |
Canonical MIME type string |
extensions |
All associated file extensions (ordered by commonness) |
description |
Human-readable purpose explanation |
category |
IANA top-level classification |
risk |
Security assessment (safe/caution/danger) |
isRegistered |
Official IANA registry status |
commonParameters |
Typical HTTP parameters (charset, boundary, etc.) |
isCommon |
Whether type appears frequently in web development |
Data Sources
The database combines:
- IANA official registry — Authoritative registered types
- Web platform standards — WHATWG, MDN compatibility data
- Server conventions — Apache, Nginx common configurations
- Security research — Executable, script, and polyglot file classifications
Content-Type Header Parsing
For full header values, the parser implements RFC 7231 and RFC 2045 specifications:
Content-Type: application/json; charset=utf-8; boundary=something │─────────────────│ │─────────────────────────────│ type parameters
Validation Steps
- Type/subtype extraction — Split on first semicolon
- Format validation — Verify
token/tokenstructure per RFC - Parameter parsing — Handle quoted strings, charset normalization
- Semantic validation — Check required parameters (e.g.,
boundaryfor multipart) - Charset verification — Flag unusual or non-standard character encodings
Security Risk Classification
Every MIME type receives a risk assessment based on these criteria:
| Risk Level | Criteria | Examples |
|---|---|---|
| Safe | Passive content, no execution capability | Images, audio, video, plain text, JSON |
| Caution | May contain active content, scripts, or archives | SVG, JavaScript, PDF, ZIP, documents with macros |
| Danger | Directly executable code or system binaries | EXE, DLL, ELF binaries, shell scripts, JAR, APK |
This classification helps developers implement appropriate validation for user-uploaded content.
Header Generation
When a MIME type is found, the tool constructs appropriate HTTP headers:
Basic Header
Content-Type: {type}
text
With Charset (for text types)
Content-Type: {type}; charset=utf-8
text
Full Parameters (when applicable)
Content-Type: {type}; charset=utf-8; boundary={generated}
text
The tool detects whether charset is appropriate based on the type category and common web usage patterns.
Server Configuration Generation
The tool generates web server directives using these templates:
Apache
AddType {mime-type} {extension-list}
Nginx
nginx
types {
{mime-type} {space-separated-extensions};
}
Extensions are formatted with dots for Apache, without dots for Nginx, following each server's convention.
Examples
JSON file extension lookup
Enter "json" to find the MIME type application/json with common parameters and HTTP header format
MIME type to extensions
Enter "image/webp" to discover all associated file extensions and server configuration
Content-Type header parsing
Paste a full header like "application/json; charset=utf-8" to validate syntax and extract parameters
Executable file risk detection
Check ".exe" to see security warnings and risk classification for executable file types
Frequently asked questions
What is a MIME type and why do I need to check it?
What is a MIME type and why do I need to check it?
A MIME type (Multipurpose Internet Mail Extensions) is a standardized label that identifies the format of a file or network resource. You need to check MIME types to ensure web servers send correct Content-Type headers, validate uploaded files match expected formats, debug API content negotiation issues, and implement proper security controls for user-generated content. Incorrect MIME types cause browsers to misrender content, download files instead of displaying them, or execute dangerous files unexpectedly.
How do I find the MIME type for a file extension?
How do I find the MIME type for a file extension?
Enter the extension without the dot (like pdf or png) into the search field. The tool returns the canonical MIME type, all associated extensions, IANA registration status, security risk level, and ready-to-use HTTP headers. For extensions with multiple MIME types (like .xml), the most common web usage is shown first.
Can I look up file extensions from a MIME type?
Can I look up file extensions from a MIME type?
Yes. Enter any MIME type like application/json or image/webp and the tool returns all associated file extensions. This is useful when you receive a MIME type from an API or HTTP header and need to know what file extensions to expect or generate.
What does the security risk indicator mean?
What does the security risk indicator mean?
The risk indicator classifies file types by their potential for malicious use. Safe types (images, audio, plain text) cannot execute code. Caution types (JavaScript, SVG, PDF, archives) may contain active content or scripts that require careful validation. Danger types (executables, shell scripts, system binaries) can run arbitrary code and should never be accepted from untrusted sources without extreme scrutiny.
How do I validate a full Content-Type header?
How do I validate a full Content-Type header?
Paste the complete header value including parameters, such as application/json; charset=utf-8 or multipart/form-data; boundary=----WebKitFormBoundary. The parser extracts the base MIME type, validates syntax per RFC specifications, identifies charset and boundary parameters, and flags missing required parameters or unusual values.
What is IANA registration and why does it matter?
What is IANA registration and why does it matter?
IANA (Internet Assigned Numbers Authority) maintains the official registry of standard MIME types. Registered types follow established standards and have guaranteed uniqueness. Unregistered (vendor-specific or experimental) types may work in specific contexts but can cause interoperability issues. The tool marks IANA-registered types for confidence in standard compliance.
Why does my file extension show "unknown" or suggest alternatives?
Why does my file extension show "unknown" or suggest alternatives?
The tool uses fuzzy matching with Levenshtein distance to detect likely typos. If you enter jepg instead of jpeg, or yml instead of yaml, it suggests the closest valid matches. For truly unknown extensions, the tool recommends checking spelling or using the browse feature to explore similar categories.
How do I use the server configuration output?
How do I use the server configuration output?
Copy the Apache AddType or Nginx types block into your server configuration file. Apache directives go in httpd.conf or .htaccess; Nginx types belong in the http block of nginx.conf or a mime.types include file. After updating configuration, reload your web server to apply changes. These directives ensure your server sends correct Content-Type headers for all file types you serve.
What is the difference between MIME type and content type?
What is the difference between MIME type and content type?
They are synonymous. "MIME type" is the historical name from email standards. "Content-Type" is the HTTP header that carries this value. Modern specifications prefer "media type" as the generic term. The tool accepts and returns all these variations interchangeably.
Why are some text types marked as caution instead of safe?
Why are some text types marked as caution instead of safe?
Some text-based formats contain executable code or active content. JavaScript files are text but execute in browsers. SVG images can contain JavaScript. Shell scripts are text but execute in system shells. The caution rating reminds developers to apply appropriate sanitization even for seemingly "plain text" formats.
How do I handle file uploads securely using this tool?
How do I handle file uploads securely using this tool?
Check the risk level before accepting any upload. Reject Danger types entirely unless you have specific executable handling requirements. For Caution types, validate file contents match extension claims (magic number checking), scan with antivirus, and serve with Content-Disposition: attachment to prevent browser execution. Never trust client-provided MIME types alone—verify with server-side detection.
What are common parameters like charset and boundary?
What are common parameters like charset and boundary?
Charset specifies text encoding (utf-8, iso-8859-1) and is required for proper character rendering. Boundary delimits parts in multipart messages like form submissions or email. Base64 indicates binary-to-text encoding. The tool shows which parameters are typical for each MIME type and generates properly formatted headers including them.
Why does the same extension have multiple MIME types?
Why does the same extension have multiple MIME types?
Some extensions are ambiguous. .xml files could be application/xml, text/xml, or specific formats like image/svg+xml. .docx files are technically application/vnd.openxmlformats-officedocument.wordprocessingml.document but may be served as application/octet-stream. The tool shows the most common web-appropriate type first while listing alternatives.
Does this tool detect MIME types from file contents?
Does this tool detect MIME types from file contents?
No—this tool performs lookup and validation based on names and headers, not content analysis (magic numbers). For content-based detection, use the Unix file command, libmagic, or server-side libraries like python-magic. This tool complements content detection by providing the metadata and configuration knowledge those tools lack.
How current is the MIME type database?
How current is the MIME type database?
The database includes all IANA-registered types as of 2024 plus widely-used de facto standards (WebP, AVIF, modern font formats). The tool is updated when new types achieve significant web platform adoption. For bleeding-edge experimental types, consult the IANA registry directly or propose additions via the project repository.
Related tools
More utilities you might find handy.
.env File Generator
Quickly generate clean, properly-quoted .env files from key-value pairs — no more quoting errors or broken deployments.
.htaccess Redirect Builder
Generate error-free Apache .htaccess code for 301 redirects, HTTPS enforcement, and canonical URL routing.
ASCII Converter – Text to ASCII, Hex, Binary & Back
Convert text to ASCII codes and decode back in decimal, hex, binary, or octal — live, private, and 100% browser-based.