MIME types
302 media types, grouped by category. Each links to the file extensions that use it.
A MIME type (or media type) is a label like image/jpegthat names a kind of data, independently of a file's name. Servers send it in the Content-Type header, and file tools use it to know what a file really is.
What a media type actually is
A media type is two words with a slash between them. The part before the slash is the top-level type, a coarse bucket that tells software how to treat the data in general: can it be shown as text, does it need a player, is it a picture. The part after is the subtype, which names the specific format. In image/svg+xml, image says the data is a picture and svg+xml says exactly which kind, with the +xml suffix adding that it happens to be XML underneath, so a generic XML parser can also make sense of it.
The whole point is that the label travels with the data rather than with the filename. A web server sends it in the Content-Type response header, an email puts one on every part of a multipart message, and an HTTP client announces what it would like back in Accept. None of that involves the extension. That is also why renaming a file changes nothing about what it is, and why the identifier on this site reads the bytes instead.
Who decides which types exist
IANA maintains the media types registry, under rules set out in RFC 6838. Registering a subtype in the standards tree needs review; the vendor tree (vnd.) is open to whoever owns the format, which is why application/vnd.ms-excel exists without a standards process. The personal tree (prs.) is for individuals. A fourth convention, the x- prefix, marked something as unregistered and experimental until RFC 6648 deprecated it in 2012, for the good reason that temporary types never actually go away: application/x-7z-compressed is still what everything sends.
Top-level types are the closed part of the system. There are eleven registered: application, audio, example, font, haptics, image, message, model, multipart, text and video. New ones are rare and need a standards-track RFC. That is worth knowing, because plenty of real-world types are not registered at all. This database contains one: avro/binary, which the Apache Avro specification defines and which is genuinely used in Avro's own HTTP protocol, but which IANA has never registered. It is listed below under its own heading rather than beside the registered types, because presenting it as a peer of image would be wrong.
Parameters, and the ones that bite
A media type can carry parameters after a semicolon. The common one is charset, as in text/html; charset=utf-8, which says which encoding the bytes use. It applies only to text types, and getting it wrong is the classic cause of accented characters turning into pairs of symbols. Other parameters are format specific: boundary on a multipart type marks where each part begins, and codecs on a video type says which codec sits inside the container, which matters because video/mp4 on its own does not tell a browser whether it can actually play the file.
The fallback, and sniffing
application/octet-stream is the arbitrary-bytes type. A server sends it when it does not know what the data is, or when it wants the browser to download rather than display. Because misconfigured servers send it constantly, browsers do not simply trust the header: they also sniff, inspecting the first bytes and deciding for themselves. That behaviour is a security problem as much as a convenience, because a file sniffed as HTML can run script, which is why X-Content-Type-Options: nosniff exists to turn it off. The bytes browsers sniff are the same magic numbers catalogued on this site.
Frequently asked questions
What is the difference between a MIME type and a file extension?
The extension is part of the filename and anyone can change it. The MIME type is metadata that travels with the data itself, in a Content-Type header or an email part, and it is what a browser or mail client actually acts on. A file named report.pdf served as text/plain will be shown as text, not opened as a PDF.
What does the x- or vnd. prefix mean?
Both mark a subtype outside the standard core set. A vnd. subtype was registered by a specific vendor, for example application/vnd.ms-excel. An x- subtype was never registered at all; RFC 6648 deprecated the convention in 2012, but plenty of x- types are too widely deployed to remove.
Why does a server send application/octet-stream?
It is the fallback for arbitrary bytes: the server is saying it does not know, or does not want to say, what the data is. Browsers respond by downloading the file rather than trying to display it, which is sometimes deliberate and sometimes just a misconfigured server.
What is the charset parameter for?
It tells the recipient which encoding the bytes use, as in text/html; charset=utf-8. It only applies to text types. Getting it wrong is the classic cause of mojibake, where accented characters render as pairs of symbols.
Registered top-level types
application
image
audio
video
text
model
font
message
Not registered with IANA
These top-level types appear in real specifications and in real traffic, but IANA has never registered them. They are listed for completeness, not as an endorsement: prefer the registered equivalent where one exists.