Search MIME Types
| Extension | MIME Type | Category | Description |
|---|
What Is a MIME Type?
A MIME type (Multipurpose Internet Mail Extensions type) is a standardized label that identifies the format of a file or data stream on the internet. When a web server sends a file to a browser, it includes the MIME type in the Content-Type HTTP header so the browser knows how to handle the response — whether to render HTML, display an image, play audio, or prompt a download.
MIME types were originally developed for email attachments (RFC 2045, 1996) but are now used across HTTP, APIs, file systems, and virtually every internet protocol that transfers data.
MIME Type Structure
Every MIME type follows the type/subtype format:
type/subtype
- type — The broad category:
image,video,audio,text,application,font, ormultipart - subtype — The specific format:
jpeg,png,mp4,plain,json,pdf
An optional parameter can follow, separated by a semicolon. The most common parameter is charset:
Content-Type: text/html; charset=utf-8 Content-Type: application/json Content-Type: image/png Content-Type: multipart/form-data; boundary=----WebKitFormBoundary
The Seven Top-Level Types
| Type | Description | Examples |
|---|---|---|
text | Human-readable text | text/html, text/css, text/plain |
image | Image data | image/png, image/jpeg, image/svg+xml |
audio | Audio data | audio/mpeg, audio/ogg, audio/wav |
video | Video data | video/mp4, video/webm |
application | Binary or structured data | application/json, application/pdf, application/zip |
font | Font formats | font/woff2, font/ttf |
multipart | Multiple data parts | multipart/form-data, multipart/mixed |
MIME Type vs File Extension
File extensions (.jpg, .pdf) and MIME types (image/jpeg, application/pdf) both identify file formats, but they work differently:
| Aspect | File Extension | MIME Type |
|---|---|---|
| Where it lives | In the filename | In the HTTP header or file metadata |
| Reliability | Can be changed or removed | Set by the server based on actual content |
| Used by | Operating systems, file managers | Browsers, APIs, email clients |
| Standard | Informal convention | IANA-registered standard |
Key point: Browsers use the MIME type from the Content-Type header, not the file extension in the URL. A file named data.txt served with Content-Type: application/json is treated as JSON.
How to Set MIME Types on Your Server
Correct MIME type configuration prevents rendering issues and security warnings.
Apache (.htaccess)
AddType application/json .json AddType font/woff2 .woff2 AddType image/webp .webp AddType image/avif .avif
Nginx (mime.types or server block)
types {
application/json json;
font/woff2 woff2;
image/webp webp;
image/avif avif;
}
Node.js / Express
res.setHeader('Content-Type', 'application/json; charset=utf-8');
res.sendFile('data.json');
Most frameworks handle common types automatically. Manual configuration is mainly needed for newer formats like AVIF, WOFF2, or WebAssembly.
Common Mistakes
- Serving JavaScript as
text/plain: Modern browsers enforce MIME type checking for scripts. If a.jsfile is served with the wrong Content-Type, the browser blocks execution with a MIME type mismatch error. - Missing
charset=utf-8for text types: Without an explicit charset, browsers may guess the encoding incorrectly, causing garbled characters. Always includecharset=utf-8fortext/html,text/css,text/javascript, andapplication/json. - Using
application/x-javascriptinstead oftext/javascript: Thex-prefix was for experimental types.text/javascriptis the official registered type for JavaScript (RFC 9239). - Serving SVG as
text/xmlorimage/xml: The correct MIME type isimage/svg+xml. Using the wrong type prevents browsers from rendering the SVG inline. - Confusing
application/x-www-form-urlencodedwithmultipart/form-data: Useapplication/x-www-form-urlencodedfor simple form fields. Usemultipart/form-datawhen the form includes file uploads. - Assuming file extension determines behavior: A file named
image.pngserved astext/htmlis treated as HTML by the browser, not as an image. The MIME type in the header always takes precedence.
Frequently Asked Questions
What is a MIME type?
A MIME type is a standardized label that identifies the format of a file or data stream. It follows the type/subtype pattern — for example, image/png or application/json. Web servers include MIME types in the Content-Type HTTP header so browsers know how to handle the response.
What is the difference between MIME type and Content-Type?
They refer to the same thing in practice. MIME type is the format label itself (e.g., text/html). Content-Type is the HTTP header that carries the MIME type, sometimes with additional parameters like charset. Example: Content-Type: text/html; charset=utf-8.
What is the MIME type for JSON?
The MIME type for JSON is application/json. Use this in API responses, AJAX requests, and anywhere you send or receive structured JSON data.
What is the MIME type for PDF?
The MIME type for PDF is application/pdf. Servers use this Content-Type so browsers display or download the PDF correctly.
What happens if the wrong MIME type is set?
Browsers may refuse to execute scripts (MIME type mismatch), display a download dialog instead of rendering content, or fail to apply stylesheets. For example, serving CSS as text/plain causes browsers to ignore the stylesheet entirely.
Are MIME types case-sensitive?
No. MIME types are case-insensitive per the HTTP specification. image/PNG and image/png are equivalent. However, the convention is lowercase, and all major registries use lowercase.
What MIME type should I use for file uploads?
For generic binary uploads where the type is unknown, use application/octet-stream. For HTML form uploads with files, the browser automatically sets multipart/form-data. For specific formats, match the MIME type to the file — image/jpeg for JPEG, application/pdf for PDF, etc.
What is the difference between text/plain and application/octet-stream?
text/plain tells the browser the content is human-readable text that can be displayed directly. application/octet-stream indicates arbitrary binary data — browsers typically prompt a file download. Use text/plain for readable text; use application/octet-stream for unknown or binary files.
Where are MIME types officially registered?
IANA (Internet Assigned Numbers Authority) maintains the official registry at iana.org/assignments/media-types. The registry defines standard types and their specifications.
What is the MIME type for SVG?
The MIME type for SVG is image/svg+xml. The +xml suffix indicates that SVG is an XML-based format.
How do I set MIME types on my web server?
On Apache, use AddType directives in .htaccess. On Nginx, edit the mime.types file or add types blocks. On Node.js/Express, set the Content-Type header or use the mime-types package. Most frameworks handle common types automatically.
What is a multipart MIME type?
Multipart MIME types contain multiple parts, each with its own Content-Type. The most common is multipart/form-data, used for HTML form submissions with file uploads. Each part is separated by a boundary string defined in the Content-Type header.
Related Tools
- URL Encoder/Decoder — encode and decode URLs and query parameters
- Base64 Encoder/Decoder — encode binary data as text for embedding or transport
- JSON Formatter — format and validate JSON data
- Meta Tag Generator — generate HTML meta tags including Content-Type
- Data Size Converter — convert between bytes, KB, MB, GB, and TB
- MIME Types Explained: What They Are and How They Work — in-depth guide to MIME types, Content-Type headers, and server configuration
Privacy & Limitations
- Client-side only. No data is sent to any server. The MIME type database is embedded in this page and all lookups happen in your browser.
- Database scope. This tool includes 80+ of the most common MIME types. Some rare or vendor-specific types may not be listed. The IANA registry contains thousands of entries.
- No file inspection. This tool looks up MIME types by file extension, not by inspecting actual file contents. A file's true format may differ from its extension.
- Convention, not detection. Extensions like
.oggmap to bothvideo/oggandaudio/oggdepending on content. This tool shows both mappings.
Related Tools
View all toolsBig-O Notation Visualizer
Interactive plot of O(1) through O(n!) complexity curves with operation count comparison
JSON Formatter
Format and beautify JSON with proper indentation
JSON Validator
Validate JSON syntax and show errors
CSV to JSON Converter
Convert CSV data to JSON format with auto-detection
JSON to CSV Converter
Convert JSON arrays to CSV format with nested object handling
JWT Decoder
Decode JWT tokens and display header and payload
MIME Type Lookup FAQ
What is a MIME type?
A MIME type (Multipurpose Internet Mail Extensions type) is a label that identifies the format of a file or data stream. It follows the pattern type/subtype — for example, image/png or application/json. Web servers send MIME types in the Content-Type HTTP header so browsers know how to handle the response.
What is the difference between MIME type and Content-Type?
They refer to the same thing in practice. MIME type is the format label itself (e.g., text/html). Content-Type is the HTTP header that carries the MIME type, sometimes with additional parameters like charset. Example header: Content-Type: text/html; charset=utf-8.
What is the MIME type for JSON?
The MIME type for JSON is application/json. This is used in HTTP Content-Type headers when sending or receiving JSON data in APIs, AJAX requests, and configuration files.
What is the MIME type for PDF files?
The MIME type for PDF files is application/pdf. Servers use this Content-Type so browsers display or download the PDF correctly instead of rendering it as raw text.
What happens if the wrong MIME type is set?
If a server sends the wrong MIME type, browsers may refuse to execute scripts (MIME type mismatch for JavaScript), display a download dialog instead of rendering content, or fail to apply stylesheets. For example, serving a CSS file as text/plain causes browsers to ignore the stylesheet.
What MIME type should I use for file uploads?
For generic binary uploads where the type is unknown, use application/octet-stream. For multipart form uploads, the browser automatically uses multipart/form-data. For specific file types, match the MIME type to the format — for example, image/jpeg for JPEG images or application/pdf for PDF documents.
What is the difference between text/plain and application/octet-stream?
text/plain tells the browser the content is human-readable text that can be displayed directly. application/octet-stream indicates arbitrary binary data — browsers typically prompt a file download instead of trying to display it. Use text/plain for readable text files and application/octet-stream for unknown or binary file types.
Are MIME types case-sensitive?
No. MIME types are case-insensitive per the HTTP specification. image/PNG and image/png are equivalent. However, the convention is to write them in lowercase, and all major registries use lowercase.
Where are MIME types officially registered?
IANA (Internet Assigned Numbers Authority) maintains the official registry of MIME types at iana.org/assignments/media-types. The registry defines standard types and their specifications. Using registered types ensures interoperability across browsers, servers, and APIs.
What is the MIME type for SVG files?
The MIME type for SVG files is image/svg+xml. The +xml suffix indicates that SVG is an XML-based format. Serving SVG with the wrong MIME type (e.g., text/plain) prevents browsers from rendering the image.
How do I set MIME types on my web server?
On Apache, use AddType directives in .htaccess (e.g., AddType application/json .json). On Nginx, edit the mime.types file or use types blocks in the server config. On Node.js/Express, use the mime or mime-types package to set Content-Type headers programmatically. Most frameworks handle common types automatically.
What is a multipart MIME type?
Multipart MIME types contain multiple parts, each with its own Content-Type. The most common is multipart/form-data, used for HTML form submissions with file uploads. Another is multipart/mixed, used in emails to combine text and attachments. Each part is separated by a boundary string defined in the Content-Type header.