What is a MIME type?

By Mark Boreland ·

In short

  • A MIME type is a short label, like application/pdf or image/png, that tells the browser what kind of file it is getting.
  • It decides whether the browser shows the file inline or downloads it.
  • A wrong MIME type is why a file sometimes downloads when you expected it to open.

A MIME type, also called a content type, is the label a server attaches to a file so the browser knows how to handle it. application/pdf tells the browser to render a document, image/png tells it to show a picture, and text/html tells it to display a page. The browser does not guess from the file extension alone; it trusts this header. Get it right and the file behaves as expected. Get it wrong and a PDF might download as a mystery blob instead of opening.

This is the mechanism behind whether a shared file opens in the browser or lands in the downloads folder. NudgeHost sets the correct MIME type for what you upload, so a document you put a PDF online opens inline and a recipient can the online PDF viewer without a download step. A page served as text/html renders, while a file the browser cannot display inline is offered as a download instead. The behaviour follows from the type, not from luck.

Most people never touch this, which is the point. It should just work. It becomes visible only when a file misbehaves, and the usual cause is a host serving the wrong type. Hosting on NudgeHost is free to start and drop a file to get started is where you drop the file in. The short version is that the MIME type is the difference between view and download, and it is handled for you.

Related terms

Frequently asked questions

Related tools

Other things you can do on NudgeHost.

Put it into practice.

Drop a file and get a shareable link in seconds. Free, no card needed.

Share a file now