MIME Type Lookup — Find Content Types by File Extension
When a web server sends a file to a browser, it includes a Content-Type header that tells the browser what kind of data is being delivered. That header value is a MIME type. Get it wrong and browsers may render HTML as raw text, block JavaScript execution, or force downloads instead of inline display. Our free MIME Type Lookup tool lets you instantly find the correct MIME type for any file extension — offline and private.
What Is a MIME Type?
MIME stands for Multipurpose Internet Mail Extensions. Originally designed for email attachments, MIME types are now the universal standard for identifying data formats on the web. A MIME type has two parts separated by a slash:
type/subtype
For example:
text/html— HTML documentimage/png— PNG imageapplication/json— JSON datavideo/mp4— MP4 videoapplication/octet-stream— Generic binary file (unknown type)
MIME types are defined by the IANA (Internet Assigned Numbers Authority) and are used in:
- HTTP
Content-Typeresponse headers - HTML
<input type="file" accept="...">attributes - CSS
@font-face srcformat declarations - Email
Content-Typeheaders for attachments fetch()andXMLHttpRequestrequests
Common MIME Types Reference
| Extension | MIME Type | Use Case |
|---|---|---|
.html | text/html | Web pages |
.css | text/css | Stylesheets |
.js | text/javascript | Scripts |
.json | application/json | API responses |
.xml | application/xml | XML data |
.png | image/png | PNG images |
.jpg | image/jpeg | JPEG images |
.webp | image/webp | WebP images |
.svg | image/svg+xml | SVG graphics |
.gif | image/gif | GIF animations |
.pdf | application/pdf | PDF documents |
.mp4 | video/mp4 | Video files |
.mp3 | audio/mpeg | MP3 audio |
.woff2 | font/woff2 | Web fonts |
.zip | application/zip | Archives |
.csv | text/csv | Spreadsheet data |
How to Use the MIME Type Lookup
- Type a file extension (with or without the dot, e.g.,
pdfor.pdf) into the search field - The matching MIME type appears instantly
- Click to copy the MIME type string to your clipboard
The tool searches an offline database of 900+ registered MIME types based on the IANA registry. No internet request is needed.
Why the Wrong MIME Type Causes Problems
Missing or incorrect MIME types are a common source of web bugs:
application/octet-streamfallback: Servers that don’t know the file type send this generic header, causing browsers to download the file instead of rendering it- CSS/JS blocked: Modern browsers enforce MIME type checking (MIME sniffing protection). If your server sends CSS with
text/plain, browsers may refuse to apply it - CORS errors: Some APIs require the correct
Content-Typein requests. Sendingtext/plainwhenapplication/jsonis expected causes validation failures - Font loading failures: Web fonts (WOFF2, WOFF) have specific required MIME types. Incorrect types prevent fonts from loading
Frequently Asked Questions
What’s the difference between application/json and text/json?
application/json is the correct, IANA-standardized MIME type for JSON. text/json is informal and not officially registered. Always use application/json in production APIs and Content-Type headers.
Why does my server send application/octet-stream for everything?
This is the fallback MIME type sent when the server cannot determine the file’s content type. It means “unknown binary data.” You need to configure your server (Nginx, Apache, Express, etc.) to map file extensions to their correct MIME types. Most frameworks handle this automatically for common types.
What MIME type should I use for fonts?
For WOFF2 files: font/woff2. For WOFF: font/woff. For TTF: font/ttf. Modern browsers also accept application/x-font-woff as a legacy fallback, but the font/ MIME types are the current standard.
Is there a difference between text/javascript and application/javascript?
Both work in browsers, but text/javascript is the currently preferred and standardized type as of RFC 9239 (2022), replacing the older application/javascript. Either will work but text/javascript is the modern recommendation.
How do I set MIME types in my web server?
- Nginx:
types { text/css css; application/json json; }block in nginx.conf - Apache:
AddType application/json .jsonin.htaccess - Express (Node.js):
res.setHeader('Content-Type', 'application/json'), or it’s set automatically byres.json() - Astro/Vite: Handled automatically for all standard file types