MIME Type Lookup
You are setting up a server and you need the right Content-Type header for .webp files. Or you are debugging why a browser is downloading a file instead of displaying it. Type the extension or media type and get the answer.
Search by extension (.pdf, json, png) or by media type (application/json). Get the canonical MIME type, RFC reference, and description.
Common lookups
| Extension | MIME Type | Notes |
|---|---|---|
.html | text/html | Do not forget the charset parameter |
.json | application/json | RFC 8259 |
.png | image/png | RFC 2084 |
.svg | image/svg+xml | It is XML, hence the +xml suffix |
.zip | application/zip | |
.webp | image/webp | Vendor-tree type |
.pdf | application/pdf | |
.mp4 | video/mp4 | |
.woff2 | font/woff2 | If this is wrong, your fonts will not load |
Trees
MIME types are organized by registration tree:
- Standards tree -- no prefix.
text/html,image/png. These are the safe, stable ones. - Vendor tree (
vnd.) --application/vnd.api+json. Specific to a product or organization. - Personal tree (
prs.) -- personal or experimental types. - Unregistered (
x-prefix) -- deprecated convention. Avoid for new work.
The one that trips people up
image/jpg does not exist. The registered type is image/jpeg. If you are serving JPEGs with image/jpg, some browsers will handle it fine and others will not. Use image/jpeg.
When you are configuring a server
Always set an explicit Content-Type with a charset for text responses. text/html; charset=utf-8 eliminates an entire class of rendering bugs. If you do not set it, browsers guess -- and they guess wrong often enough to matter.