MIME Types Reference
Look up MIME types by file extension or search by type string. Covers text, image, audio, video, font, and application types.
Search for MIME types by file extension (like .png) or by type string (like application/json). Filter by category - text, application, image, audio, video, or font. Click to copy the MIME type string for your server config, API headers, or Content-Type declarations. Covers modern formats like AVIF, WebP, WOFF2, and WASM alongside all the classics.
About MIME Types Reference
What Is a MIME Type?
MIME (Multipurpose Internet Mail Extensions) types - also called media types - are standardised labels that tell software what kind of data a file contains. Every MIME type follows the format type/subtype, where the type is one of seven top-level categories (text, application, image, audio, video, font, multipart) and the subtype names the exact format. When a web server sends a file, it includes the MIME type in the HTTP Content-Type header so the browser knows how to handle it.
The system was originally defined in RFC 2046 for email attachments back in 1996, but it became the backbone of content negotiation on the web. The IANA (Internet Assigned Numbers Authority) maintains the official registry of all registered MIME types. As of 2026, the registry contains over 1,700 registered subtypes across all categories, with new types still being added regularly. RFC 6838 defines the current registration procedures, including rules for vendor-prefixed types (vnd.) and personal types (prs.).
Common Web MIME Types
| Extension | MIME Type | Description |
|---|---|---|
| .html | text/html | HTML documents |
| .css | text/css | CSS stylesheets |
| .js / .mjs | text/javascript | JavaScript files (RFC 9239 made text/javascript the sole standard type) |
| .json | application/json | JSON data |
| .xml | application/xml | XML documents |
| .svg | image/svg+xml | SVG vector images |
| .png | image/png | PNG images |
| .jpg / .jpeg | image/jpeg | JPEG images |
| .webp | image/webp | WebP images (modern format) |
| .avif | image/avif | AVIF images (next-gen format) |
| .gif | image/gif | GIF images/animations |
| .ico | image/x-icon | Favicon icons |
| application/pdf | PDF documents | |
| .woff2 | font/woff2 | WOFF2 web fonts (preferred format) |
| .woff | font/woff | WOFF web fonts |
| .wasm | application/wasm | WebAssembly modules |
| .mp4 | video/mp4 | MP4 video |
| .webm | video/webm | WebM video |
| .mp3 | audio/mpeg | MP3 audio |
| .zip | application/zip | ZIP archives |
How Is a MIME Type Structured?
Every MIME type has two required parts separated by a forward slash: the top-level type and the subtype. Some types also include parameters after a semicolon. The most common parameter is charset, which specifies the character encoding. For example, text/html; charset=utf-8 tells the browser the document is HTML encoded in UTF-8. About 98.9% of websites use UTF-8 encoding as of early 2026, according to W3Techs data, making it the de facto default for text content.
Subtypes can also carry a structured syntax suffix (defined in RFC 6838), indicated by a plus sign. For instance, image/svg+xml signals that SVG files are XML-based, and application/ld+json tells clients that JSON-LD data is JSON underneath. This lets generic parsers handle the content even if they do not know the specific subtype.
Vendor-specific types use the vnd. prefix. Microsoft Office formats use this heavily - application/vnd.openxmlformats-officedocument.spreadsheetml.sheet is the registered type for .xlsx files. These long names are cumbersome but they follow the IANA naming convention exactly.
MIME Type Categories
| Top-Level Type | Description | Examples |
|---|---|---|
| text | Human-readable text | text/html, text/css, text/plain, text/csv, text/javascript |
| application | Binary or structured data | application/json, application/pdf, application/zip |
| image | Image data | image/png, image/jpeg, image/svg+xml, image/webp |
| audio | Audio data | audio/mpeg, audio/ogg, audio/wav |
| video | Video data | video/mp4, video/webm, video/ogg |
| font | Font data (added by RFC 8081) | font/woff2, font/woff, font/ttf |
| multipart | Multi-part message bodies | multipart/form-data (file uploads) |
RFC 8081 added font as a top-level type in 2017. Before that, fonts were registered under application (e.g. application/font-woff). The newer font/ prefix is now preferred for all web font types. Even more recently, RFC 9695 introduced haptics as a top-level type in March 2025 for tactile feedback data, though it has limited web relevance so far.
The JavaScript MIME Type Change (RFC 9239)
One of the most common sources of confusion is the correct MIME type for JavaScript. Historically, servers used a mix of application/javascript, text/javascript, application/x-javascript, and others. RFC 9239, published in May 2022, settled the debate: text/javascript is now the sole official MIME type for JavaScript. All others - including application/javascript - are considered obsolete aliases.
The RFC states plainly: "Servers should use text/javascript for JavaScript resources." RFC 9239 also formally registered the .mjs extension for JavaScript module files, mapping it to the same text/javascript type. Browsers still accept the old types for backward compatibility, but new server configurations should use text/javascript exclusively.
This matters for tools like Nginx, where the default mime.types file historically mapped .js to application/javascript. Several projects - including Nginx itself, Drupal, Spring Framework, and Python's standard library - have all updated their defaults in response to RFC 9239.
Why Getting the MIME Type Right Matters
| Wrong MIME Type | What Happens |
|---|---|
| JS served as text/plain | Browser refuses to execute it (MIME type checking blocks non-script types) |
| CSS served as text/plain | Styles are not applied; browser logs a warning |
| HTML served as text/plain | Browser shows raw HTML source instead of rendering the page |
| JSON served as text/html | API clients may fail to parse the response |
| SVG served as text/xml | May render but without proper CORS handling for fonts/styles |
| Binary served as text/html | Browser tries to render garbage characters; possible XSS vector |
The X-Content-Type-Options: nosniff header prevents browsers from guessing the content type when it does not match the declared type. Without this header, older browsers would "sniff" the content and potentially execute a malicious file that was served as text/plain but contained HTML or JavaScript. With nosniff set, the browser strictly enforces the Content-Type header. For script and style resources, the browser blocks the response entirely if the declared MIME type is not valid for that resource type. All major browsers - Chrome, Firefox, Edge, and Safari - support nosniff. It was first introduced by Microsoft in Internet Explorer 8.
MIME Types in Server Configuration
| Server | Where to Configure | Example |
|---|---|---|
| Nginx | mime.types file or types {} block | types { text/javascript js mjs; } |
| Apache | .htaccess or httpd.conf | AddType text/javascript .js .mjs |
| Express.js | express.static() or res.type() | res.type('application/json') |
| Cloudflare Pages | Automatic based on extension | No config needed for standard types |
| AWS S3 | Object metadata | Set Content-Type when uploading objects |
| Caddy | Automatic from built-in table | Override with header directive if needed |
Most modern web servers and CDNs automatically map common extensions to the correct MIME types, but you may need to add entries manually for newer formats like .avif, .wasm, or .mjs. Always test by inspecting the Content-Type header in your browser's developer tools (Network tab) to confirm the server is sending the right type.
Special MIME Types
| MIME Type | Purpose | Notes |
|---|---|---|
| application/octet-stream | Generic binary data | Default for unknown file types; triggers download |
| multipart/form-data | File upload forms | Used with <form enctype="multipart/form-data"> |
| application/x-www-form-urlencoded | Standard form submission | Default for HTML forms without file uploads |
| text/event-stream | Server-Sent Events | Used for SSE streaming connections |
| application/manifest+json | Web App Manifest | PWA configuration file |
| application/wasm | WebAssembly | Required for streaming compilation of .wasm files |
| application/ld+json | JSON-LD structured data | Used in <script type="application/ld+json"> for SEO |
Common Mistakes with MIME Types
A few patterns come up repeatedly when debugging Content-Type problems:
Using application/javascript instead of text/javascript. Per RFC 9239, text/javascript is the correct type. While browsers still accept both, servers and linting tools are gradually flagging the old form. Update your Nginx mime.types or Apache config if it still references application/javascript.
Forgetting charset on text types. Serving text/html without charset=utf-8 can cause garbled characters on pages with non-ASCII content. Always include the charset parameter for HTML, CSS, and plain text responses. JSON does not need it because RFC 8259 requires JSON to be UTF-8 by default.
Serving .svg as image/png or application/xml. SVG files need image/svg+xml specifically. Serving them as generic XML can break inline styles and font loading. If SVGs are used as <img> sources, the correct MIME type is essential for the browser to render them properly.
Missing MIME type for .wasm files. WebAssembly requires application/wasm for streaming compilation to work. Without it, browsers fall back to ArrayBuffer compilation, which is slower and consumes more memory.
Using image/x-icon vs image/vnd.microsoft.icon. Both are used for .ico files, but neither is universally standardised. Most browsers accept image/x-icon without issue. For modern favicons, consider using image/png with a 32x32 PNG file instead.
MIME Types for Modern Web Formats
Several newer file formats have their own registered MIME types that older server configurations may not include by default:
| Format | MIME Type | Server Support Notes |
|---|---|---|
| AVIF images | image/avif | Added to most servers post-2021; may need manual config on older setups |
| WebP images | image/webp | Widely supported; included in default configs since ~2019 |
| WOFF2 fonts | font/woff2 | Preferred web font format; some older configs still use application/font-woff2 |
| WebAssembly | application/wasm | Required for streaming compilation; not in all default configs |
| JSON-LD | application/ld+json | Used for structured data in SEO; standard JSON parser handles it |
| HEIC images | image/heic | Apple's photo format; limited browser support but common in file transfers |
For looking up HTTP response codes alongside MIME types, the HTTP Status Codes Reference has a searchable list. For encoding binary data as text for transport, the Base64 Encoder handles that. To validate and format JSON payloads before setting the right Content-Type, the JSON Formatter is a quick way to check structure.
Sources
Frequently Asked Questions
What is a MIME type?
MIME stands for Multipurpose Internet Mail Extensions. A MIME type is a label that tells browsers and servers what kind of data a file contains, like text/html for web pages or image/png for PNG images. It is sent in the Content-Type HTTP header.
How do I find the right MIME type for my file?
Search by file extension (like .png or .json) or by the MIME type string itself. The tool covers common text, application, image, audio, video, and font types. Click Copy to grab the MIME type for your code.
Why is the correct MIME type important?
Browsers use MIME types to decide how to handle files. Serving a JavaScript file with text/plain instead of text/javascript can cause security warnings or block execution entirely. Setting the correct Content-Type header ensures files are processed correctly.
What is application/octet-stream?
This is the default MIME type for binary files when the actual type is unknown. Browsers typically treat it as a download rather than trying to display it. It is a safe fallback for arbitrary binary data.
Is this list complete?
It covers the most commonly used MIME types across web development, including modern formats like WebP, AVIF, WOFF2, and WebAssembly. For very rare or vendor-specific types, check the IANA media types registry.
Related Tools
Link to this tool
Copy this HTML to link to this tool from your website or blog.
<a href="https://toolboxkit.io/tools/mime-types-reference/" title="MIME Types Reference - Free Online Tool">Try MIME Types Reference on ToolboxKit.io</a>