MIME Type Lookup
Find the MIME type for a file extension, or the extensions for a MIME type.
| Extension | MIME type | |
|---|---|---|
| .txt | text/plain | |
| .html | text/html | |
| .css | text/css | |
| .csv | text/csv | |
| .md | text/markdown | |
| .ics | text/calendar | |
| .js | text/javascript | |
| .mjs | text/javascript | |
| .json | application/json | |
| .xml | application/xml | |
| .yaml | application/yaml | |
| .yml | application/yaml | |
| .wasm | application/wasm | |
| application/pdf | ||
| .rtf | application/rtf | |
| .zip | application/zip | |
| .gz | application/gzip | |
| .tar | application/x-tar | |
| .7z | application/x-7z-compressed | |
| .rar | application/vnd.rar | |
| .bin | application/octet-stream | |
| .doc | application/msword | |
| .docx | application/vnd.openxmlformats-officedocument.wordprocessingml.document | |
| .xls | application/vnd.ms-excel | |
| .xlsx | application/vnd.openxmlformats-officedocument.spreadsheetml.sheet | |
| .ppt | application/vnd.ms-powerpoint | |
| .pptx | application/vnd.openxmlformats-officedocument.presentationml.presentation | |
| .png | image/png | |
| .jpg | image/jpeg | |
| .jpeg | image/jpeg | |
| .gif | image/gif | |
| .svg | image/svg+xml | |
| .webp | image/webp | |
| .avif | image/avif | |
| .apng | image/apng | |
| .bmp | image/bmp | |
| .ico | image/vnd.microsoft.icon | |
| .tiff | image/tiff | |
| .mp3 | audio/mpeg | |
| .wav | audio/wav | |
| .ogg | audio/ogg | |
| .aac | audio/aac | |
| .weba | audio/webm | |
| .mp4 | video/mp4 | |
| .webm | video/webm | |
| .mpeg | video/mpeg | |
| .mov | video/quicktime | |
| .avi | video/x-msvideo | |
| .woff | font/woff | |
| .woff2 | font/woff2 | |
| .ttf | font/ttf | |
| .otf | font/otf | |
| .eot | application/vnd.ms-fontobject |
What is a MIME type?
A MIME type (also called a media type or content type) tells browsers and servers what kind of data a file contains, such as text/html or image/svg+xml. It is sent in the Content-Type response header and decides how the content is handled — rendered, downloaded, or executed. Getting it right matters for security and for features like inline previews and font loading.
Setting response headers? Pair this with the HTTP status code reference. Encoding a file inline? The SVG to data URI and Base64 tools include the right MIME type for you.
Built and maintained by Meet Shah · Last updated
What this tool is used for
- Finding the correct MIME type for a file extension.
- Finding which extensions a MIME type covers.
- Checking a type before setting a content-type header.
- Confirming the type a server should send for an asset.
- Resolving a download that opens in the browser instead of saving.
Frequently Asked Questions
- What is a MIME type for?
- It tells the recipient how to interpret bytes. Browsers act on the `Content-Type` header, not the file extension, so serving a stylesheet as `text/plain` means it is downloaded or ignored rather than applied.
- Why is JavaScript listed as text/javascript?
- Because that is what the current specification requires. `application/javascript` and `application/x-javascript` are both obsolete though still widely accepted; the HTML standard designates `text/javascript` as the one to use.
- Do I need charset on a text type?
- Yes for anything textual. Without `; charset=utf-8` the browser falls back to a default that may not be UTF-8, which is how correct source files end up rendering as mojibake. It is unnecessary for binary types.
- Why are Office types so long?
- They are vendor-registered types under the `vnd.` tree, and the OOXML names encode the whole format lineage. The legacy binary formats are much shorter — `application/msword` for .doc against the full `openxmlformats` string for .docx.
- What does application/octet-stream mean?
- "Unknown bytes." It is the correct fallback when the type genuinely is not known, and it usually triggers a download prompt. Using it as a lazy default for a known type defeats caching and inline display.
- Can one extension have several types?
- Yes, and the reverse too. `.ogg` may be audio or video, and both `.jpg` and `.jpeg` are `image/jpeg`. Where a mapping is ambiguous the server's configuration decides, which is why explicit `types` blocks are worth setting.
Common errors and gotchas
- Trusting a client-supplied type, which is trivially forged and must never gate an upload.
- Using a non-standard type where a registered one exists, which some clients reject.
- Omitting the charset on a text type, which leaves the encoding to a guess.
- Assuming the extension determines the type, when the bytes are what actually matter.
- Serving a JavaScript module with the wrong type, which browsers refuse to execute.
Related Developer Utilities tools
RegExp Tester
Test regular expressions and inspect matches locally.
Regex Visualizer
Visual regex pattern diagram with live match highlighting and capture group annotations.
Subnet Calculator
Compute CIDR subnets, usable hosts, and network ranges.
Cron Parser
Translate cron syntax into plain English.
URL Parser
Break a URL into protocol, host, path, and query parts.
HTML Previewer
Paste HTML and see it rendered live in a safe, sandboxed preview.
HTTP Status Code Reference
Search and look up every HTTP status code and its meaning.
ASCII Table
Full ASCII table with decimal, hex, octal, and binary values for every character.