How to use the MIME type lookup
- Type into Search by extension, filename or MIME type:
pdf,.png,report.docxorimage/webp. A leading dot, a*.wildcard or a whole filename all work. - Press a category button such as Images or Fonts to narrow the list. The line under the buttons says how many file types match.
- Press the MIME type itself to copy it. The label changes to Copied.
How MIME types work
A MIME type, also called a media type, has the form type/subtype, such as image/png, and may carry parameters like ; charset=utf-8. Servers send it in the Content-Type header so the browser knows what the bytes are, and email attachments and file uploads carry it too. IANA keeps the media types registry. Types that are common but not in it, such as audio/wav, video/webm and application/x-tar, are marked on their rows. Matching an extension to a type is a convention, since a file name does not guarantee what is inside.
Worked example
On load the box is empty and the line under the buttons reads Showing all 132 file types. Type report.docx and the tool reads the extension, so it shows Showing 1 of 132 file types with the row .docx, application/vnd.openxmlformats-officedocument.wordprocessingml.document and the description Microsoft Word. Type application/javascript instead and you get .js, .mjs and .cjs, because that old name is listed on those rows as obsolete in favor of text/javascript (RFC 9239).
Limits and edge cases
- The list holds 132 common extensions, not the whole IANA registry of more than 2,000 types.
- Some extensions have two real meanings.
.tsis MPEG video here but also TypeScript, and.xmlis usuallyapplication/xmlalthoughtext/xmlstill appears. - Types are listed without parameters. Add
; charset=utf-8to text types when you send them. - With the
X-Content-Type-Options: nosniffheader, browsers refuse scripts and stylesheets whose type is wrong, so check the type before you blame the code.
Related tools: the HTTP status code list explains 415 Unsupported Media Type, and the Base64 encoder and decoder builds data URIs that start with a MIME type.
Frequently asked questions
What is application/octet-stream?
It is the generic type for binary data, used when the server does not know what a file is. Most browsers respond by downloading the file instead of showing it.
What is the correct MIME type for JavaScript?
Use text/javascript. RFC 9239 made it the standard and marked application/javascript and application/x-javascript obsolete, although many servers and tools still send the old names.
Is image/jpg a valid MIME type?
No. The registered type for JPEG files is image/jpeg for both .jpg and .jpeg. Browsers often tolerate image/jpg, but validators and strict servers can reject it.
What is the difference between a MIME type and a file extension?
The extension is part of the file name and only hints at the format. The MIME type is sent separately, for example in the Content-Type header, and tells the receiver how to treat the bytes.
What happens if a server sends the wrong Content-Type?
The browser may download a file it should display, render it as plain text, or block it. With nosniff set, a script served as text/plain will not run.
Sources: IANA media types registry, RFC 9239 and the MDN common MIME types list.