MIME types and the Content-Type header explained
What MIME types are, how servers use the Content-Type header, why one type can have several extensions, and when to reach for octet-stream.
What a MIME type actually is
A MIME type is a short label like text/html or image/png that names the format of a piece of data. It has two parts separated by a slash: a top-level type such as text, image, audio, video or application, and a subtype that pins down the exact format. Originally defined for email attachments, the same labels now drive the whole web. Whenever a browser downloads something, the MIME type is what tells it whether to render, play or save the bytes.
The Content-Type header
When a server sends a response, it includes a Content-Type header carrying the MIME type, for example Content-Type: application/json. The browser trusts this header over the file extension in the URL, so getting it right matters. A stylesheet served as text/plain instead of text/css will not style the page, and a JSON API served as text/html can confuse clients. This is the most common place developers reach for a MIME lookup: to set the header a static file or API response should carry.
Why one type maps to several extensions
File extensions are just naming conventions, and history left us with duplicates. The image/jpeg format is written as jpg, jpeg or jpe depending on the era and tool, and YAML files appear as both yaml and yml. All of these carry identical data, so they share a single MIME type. When you search this tool by a MIME type, it returns every extension it knows for that type, sorted alphabetically, which is useful when you need to accept any of the common spellings.
When to use application/octet-stream
Sometimes there is no meaningful type, or you deliberately want the browser to download a file rather than open it. The catch-all application/octet-stream means arbitrary binary data, and it is the safe default for anything unrecognised. Serving a file with this type, often together with a Content-Disposition: attachment header, prompts a download instead of an inline preview. If this tool returns no match for an extension, octet-stream is usually the fallback you want.