What MIME Type Lookup does
A MIME type (also called a media type or content type) is the label a server sends so the browser knows what a file is, for example image/webp for a .webp picture. This MIME type lookup takes an extension, with or without the dot, and returns the type, the full Content-Type header to send, and whether the format is text-based and so should carry charset=utf-8. Type part of a MIME type instead and you get a table of every matching extension. The list is deliberately short: 36 entries covering the formats a website normally serves, from HTML, CSS and JavaScript to images, fonts, audio, video, PDF and Office documents. Leave the box empty to see all of them.
MIME type list: web pages, data and documents
These are the text and document entries exactly as the tool returns them. A Yes in the last column means the tool adds charset=utf-8 to the header.
| Extension | MIME type | Charset added? |
|---|---|---|
| .html, .htm | text/html | Yes |
| .css | text/css | Yes |
| .js, .mjs | text/javascript | Yes |
| .json | application/json | Yes |
| .xml | application/xml | Yes |
| .txt | text/plain | Yes |
| .csv | text/csv | Yes |
| .md | text/markdown | Yes |
| application/pdf | No | |
| .doc | application/msword | No |
| .docx | application/vnd.openxmlformats-officedocument.wordprocessingml.document | No |
| .xls | application/vnd.ms-excel | No |
| .xlsx | application/vnd.openxmlformats-officedocument.spreadsheetml.sheet | No |
| .ppt | application/vnd.ms-powerpoint | No |
| .pptx | application/vnd.openxmlformats-officedocument.presentationml.presentation | No |
| .zip | application/zip | No |
| .gz | application/gzip | No |
| .wasm | application/wasm | No |
| .bin, .exe | application/octet-stream | No |
JSON is defined as UTF-8 and has no registered charset parameter, so application/json on its own is also correct; the extra parameter is harmless.
Image, font, audio and video MIME types
The media entries in the tool. All are binary except SVG.
| Extension | MIME type | Kind |
|---|---|---|
| .png | image/png | Image |
| .jpg, .jpeg | image/jpeg | Image |
| .gif | image/gif | Image |
| .webp | image/webp | Image |
| .avif | image/avif | Image |
| .svg | image/svg+xml | Image (XML text) |
| .ico | image/x-icon | Image |
| .woff | font/woff | Font |
| .woff2 | font/woff2 | Font |
| .ttf | font/ttf | Font |
| .otf | font/otf | Font |
| .mp3 | audio/mpeg | Audio |
| .wav | audio/wav | Audio |
| .ogg | audio/ogg | Audio |
| .mp4 | video/mp4 | Video |
| .webm | video/webm | Video |
| .mov | video/quicktime | Video |
For .ico the tool gives image/x-icon, the long-standing name every browser accepts. The name registered with IANA is image/vnd.microsoft.icon; either works for a favicon.
Example lookups and what comes back
Extension with a leading dot
Extension or MIME type: .svg
MIME type image/svg+xml. Content-Type header: Content-Type: image/svg+xml; charset=utf-8. Category image. Text-based: Yes, send a charset.
An extension that shares its type
Extension or MIME type: jpeg
MIME type image/jpeg. Content-Type header: Content-Type: image/jpeg. Text-based: No, binary. Other extensions: jpg.
Searching by top-level type
Extension or MIME type: font
4 matches: .woff font/woff, .woff2 font/woff2, .ttf font/ttf and .otf font/otf, none of them text.
A short query that matches two things
Extension or MIME type: js
The .js panel with text/javascript and Other extensions: mjs, plus a Related types table listing .json as application/json.
Matching is by substring, so js also finds json. The panel always shows the exact extension you typed.
Finding the long Office types
Extension or MIME type: openxml
3 matches: the .docx, .xlsx and .pptx types, each beginning application/vnd.openxmlformats-officedocument.
A format that is not in the list
Extension or MIME type: heic
No MIME type found for "heic".
See the table of other common types further down.
Common MIME types this lookup does not include
The tool holds 36 entries. These formats come up often and are not among them, so they are listed here for reference; searching for them in the box above returns no result.
| Extension | MIME type |
|---|---|
| .heic | image/heic |
| .bmp | image/bmp |
| .tif, .tiff | image/tiff |
| .flac | audio/flac |
| .aac | audio/aac |
| .avi | video/x-msvideo |
| .eot | application/vnd.ms-fontobject |
| .rtf | application/rtf |
| .epub | application/epub+zip |
| .odt | application/vnd.oasis.opendocument.text |
| .ics | text/calendar |
| .jsonld | application/ld+json |
| .webmanifest | application/manifest+json |
| .tar | application/x-tar |
| .7z | application/x-7z-compressed |
| .rar | application/vnd.rar |
Where to set the Content-Type once you know it
Looking up the value is half the job. These are the usual places it is configured.
- nginx: add the pair to the types block or to mime.types, for example image/avif avif; then reload.
- Apache: AddType image/avif .avif in the server config or an .htaccess file.
- Node and Express: res.type('json') or res.set('Content-Type', 'application/json; charset=utf-8') before sending the body.
- Object storage and CDNs: the type is stored as metadata on each object at upload time. A file uploaded without one is usually served as application/octet-stream until the metadata is corrected.
- HTML forms and fetch: a request body has a Content-Type too, such as application/json for an API call or multipart/form-data for a file upload.
- After changing it, confirm with curl -I https://example.com/file.webp and read the Content-Type line in the response headers.
Why browsers trust the header and not the extension
A browser decides what to do with a response from its Content-Type header. The extension is only part of the URL and can say anything. A file named styles.css that arrives as text/plain is not applied as a stylesheet, and a module script that arrives as anything other than a JavaScript type is refused with a strict MIME type error in the console.
The most common symptom of a wrong type is a file that downloads when it should open. That is application/octet-stream at work: the server had no mapping for the extension and fell back to the generic binary type. A Content-Disposition: attachment header forces a download regardless of type, so check for that as well.
The charset parameter belongs on text formats only. It tells the browser how to turn bytes into characters, and leaving it off an HTML page can produce garbled accented letters. Images, fonts, video and PDFs have no character encoding, so a charset on them means nothing.
One caution for upload forms: the type a browser reports for an uploaded file is guessed from the extension on the visitor's machine and is easy to fake. Renaming a script to photo.jpg is enough to make it report image/jpeg. Check the file's actual bytes on the server.
How to get your result
- 1
Type a file extension in the Extension or MIME type box, such as webp, .svg or docx. A leading dot is ignored and capitals are accepted.
- 2
Read the panel for that extension: MIME type, Content-Type header, Category, Text-based and Other extensions.
- 3
Copy the Content-Type header line into your server, CDN or API response. If Text-based says Yes, the line already ends with charset=utf-8.
- 4
To search the other way, type a type or part of one, such as application/json, font or image/, and read the table of Extensions, MIME type and Text?.
- 5
Clear the box to list all 36 entries.