What is a MIME type — Content-Type explained
What is a MIME type (Content-Type): labels like image/png and application/json and why the web needs them.
A MIME type (Media Type) is a standard label of the form type/subtype, such as image/png, application/json, or text/html. Browsers and servers use it to decide how to process and display content.
The first part is the category (text, image, audio, video, application), the second is the specific format. In a data URL, MIME sits right after data: and before ;base64, — for example data:image/png;base64,iVBOR…
A correct MIME matters for security and compatibility: servers send it in the Content-Type header, and browsers rely on it when rendering. The ToolsHelper data URL builder fills in the right MIME automatically.
A MIME type is a label such as image/jpeg or text/html. The browser uses it to decide whether to show, download, or execute. A file named photo.jpg can still be HTML if the server says text/html. The sniff of magic bytes is a second check and can disagree with the label. This page defines the label. Base64 of a file does not change the type; it only changes the encoding of the bytes.
FAQ
Required in Base64?
Only inside data URLs, not in raw Base64.
What happens with a wrong MIME?
The browser may download the file instead of showing it, or fail to render it.
