MIME Types Explained: What Content-Type Really Means
2026-09-03
When a browser downloads a file instead of showing it, or a page loads without its styling, the culprit is often a wrong MIME type. It’s one of those quiet, invisible headers that only matters when it’s wrong — but when it’s wrong, it breaks in confusing ways.
This guide explains what MIME types are, why the Content-Type header matters so much, and how to find the right value.
What a MIME type is
MIME stands for Multipurpose Internet Mail Extensions. It was originally invented for email, so that a message could carry more than plain ASCII text. The name stuck, but the use has grown far beyond email.
A MIME type follows a simple type/subtype format — for example image/png, application/pdf, or text/html. The part before the slash is the category (image, text, application), and the part after is the specific subtype (png, pdf, html). There’s also the generic binary type application/octet-stream, used when the sender doesn’t know or won’t say what the file really is.
MIME types are registered and maintained by the IANA, so the list is standardized.
Why the Content-Type header matters
When a web server returns a file, it declares the file’s type in the Content-Type response header. The browser uses that header to decide what to do with the response. This single decision causes a whole family of everyday bugs:
- Broken images. If a server sends
text/htmlinstead ofimage/png, the browser tries to render the image as a page and nothing shows. - Pages without styling. If a browser receives a CSS file labeled
text/plain, it refuses to apply it as a stylesheet, and the page loads as unstyled HTML. - Download instead of display. If a PDF is sent as
application/octet-stream, the browser saves it to disk instead of opening it. - Refused scripts. A JavaScript module served with the wrong type is not executed.
In every case, the file is fine — the label is what’s wrong.
How to look up the right MIME type
You’ll need a MIME type whenever you set a header, configure a file server, or fill in an HTML accept attribute. The easiest approach is to look it up by extension:
- A
.webpfile →image/webp - A
.mp4file →video/mp4 - A
.jsonfile →application/json - A
.svgfile →image/svg+xml
A lookup tool lets you search by extension or by type, browse by category, and copy the exact string. The key is to match the real content of the file, not whatever the file extension might suggest after a rename.
Quick Reference
- A MIME type is a
type/subtypestring, e.g.image/png,application/pdf. - The
Content-Typeresponse header tells the browser how to handle a file. - A wrong type causes broken images, unstyled pages, downloads instead of display, and refused scripts.
application/octet-streamis the generic binary type when the real type is unknown.- Look up the value by extension to match the file’s real content.
Getting started
If you need the correct Content-Type value — for an API response, a file server, or an upload form — the MIME Type Lookup finds it in seconds by extension or type string. And when the MIME type is right but a request still fails, the HTTP Status Reference helps you decode the status code the server returned.