What is MIME Type?

Published on November 10, 2026 • Last updated November 10, 2026

Official Definition

A MIME type (media type) is a standard label such as image/png or application/pdf that tells software what kind of data a file or HTTP response contains.

Detailed Explanation

In-Depth Guide

Key Takeaway

A MIME type has a type and a subtype separated by a slash, for example text/csv or video/mp4.

Browsers send it in the Content-Type header, and servers use it to decide how to handle an upload or a download.

Because the file extension and the declared type can both be changed by the sender, secure upload code should not trust either one alone: it should check the real content, for example the first bytes of the file, against the allowed list.

Frequently Asked Questions

Yes. The Content-Type header comes from the client, so a script can label any file as image/png. Validate the file content on the server instead of trusting the header or the extension.

application/octet-stream is the generic type for arbitrary binary data.

No. The extension is part of the file name, while the MIME type describes the data. They usually match, but a mismatch is a common sign of a mislabelled or malicious upload.

What do you need to work out next?

Search 276+ free tools by name, or pick a category below. Every one runs instantly in your browser — no signup, nothing to install.

More Developer Tools
AI ADVISOR & COACH

Ask AI Advisor

Ask AI