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-Typeheader, not the file extension, so serving a stylesheet astext/plainmeans it is downloaded or ignored rather than applied. - Why is JavaScript listed as text/javascript?
- Because that is what the current specification requires.
application/javascriptandapplication/x-javascriptare both obsolete though still widely accepted; the HTML standard designatestext/javascriptas the one to use. - Do I need charset on a text type?
- Yes for anything textual. Without
; charset=utf-8the 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/mswordfor .doc against the fullopenxmlformatsstring 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.
.oggmay be audio or video, and both.jpgand.jpegareimage/jpeg. Where a mapping is ambiguous the server's configuration decides, which is why explicittypesblocks 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 tools
Common Ports Lookup
Search a reference of common TCP/UDP port numbers and the services that use them — HTTP, SSH, DNS, and more.
URL Parser
Break a URL into protocol, host, path, and query parts.
HTTP Headers Lookup
Look up common HTTP headers: definitions, examples, and types.
ANSI Color Codes Reference
ANSI terminal escape codes: 16 standard colors, the 256-color palette, RGB true color and text styles. Click a code to copy its escape sequence.
HTTP Methods Reference
Complete reference for all 9 HTTP methods — safe, idempotent, cacheable properties and status codes.
URL Encoder
Safely encode or decode URL parameters.
HTML Previewer
Paste HTML and see it rendered live in a safe, sandboxed preview.
SVG Placeholder Generator
Generate a lightweight SVG placeholder image (any size, colors, and label) as markup or a data URI.