MIME Type Checker
Look up MIME type by file extension, or find extensions for a given MIME type.
About MIME Type
Looks up the MIME type associated with a file extension, or works in reverse to find which extensions correspond to a given MIME type. Getting a MIME type wrong in server config or an application's Content-Type header can cause a browser to render a file incorrectly, refuse to display it inline when it should, or trigger a download prompt for content meant to display directly. Useful when configuring a web server's MIME type mappings for an uncommon file extension.
Some browsers will still "sniff" the actual file content and override an incorrect declared MIME type as a compatibility fallback — but this is inconsistent across browsers, exactly the kind of inconsistency a correct Content-Type header avoids relying on.
Related Tools
Types worth getting right
| Extension | MIME type |
|---|---|
.html | text/html |
.css | text/css |
.js, .mjs | text/javascript (the standard type since RFC 9239; application/javascript is obsolete but still works) |
.json | application/json |
.svg | image/svg+xml |
.webp | image/webp |
.woff2 | font/woff2 |
.wasm | application/wasm |
.webmanifest | application/manifest+json |
.pdf | application/pdf |
Why a wrong type breaks things
- With the
X-Content-Type-Options: nosniffheader, browsers refuse to run a script or apply a stylesheet served with the wrong type. JavaScript served astext/plainsimply doesn't load. WebAssembly.instantiateStreaming()requiresapplication/wasm.- Whether a file opens in the browser or downloads depends on its type and on the
Content-Dispositionheader. - For text types, add a charset:
text/html; charset=utf-8. A missing or wrong charset is a classic cause of garbled characters.
Set it on the server and check it
- nginx: add the mapping in a
types { }block, for exampletypes { application/wasm wasm; }, or inmime.types. - Apache:
AddType application/wasm .wasm - Check what is actually served:
curl -sI https://example.com/app.wasm | grep -i content-type, or use the HTTP headers checker.