Find the MIME type (Content-Type) for any file extension, or the extensions for a type. Drop a file to detect its real type from its first bytes, and compare it with what the extension and your browser claim.
Reads the file’s first bytes (its signature) in your browser and compares them with the extension and the type your browser reports. Nothing is uploaded.
# macOS and Linux: reads the content, like the detector abovefile --mime-type report.pdf# report.pdf: application/pdf# What a server actually sendscurl -sI https://example.com/report.pdf | grep -i '^content-type'
Getting “Refused to apply style” or “Failed to load module script” errors? Those are MIME type problems: see
.css and .js. For other response headers, look up the
HTTP status codes.
Frequently asked questions
What is a MIME type?
+
A MIME type (or media type) is a label like text/html or image/png that says what kind of data a file or HTTP response contains. Servers send it in the Content-Type header, and browsers use it, not the file extension, to decide whether to show, play, run or download what they receive.
How do I find the MIME type of a file?
+
Type the extension into the lookup above, or drop the file on the detector. The detector reads the file’s first bytes, its signature, so it also catches files whose extension is wrong. On the command line, "file --mime-type name" does the same on macOS and Linux.
What is the difference between a MIME type and Content-Type?
+
The MIME type is the value, such as application/json. Content-Type is the HTTP (and email) header that carries it, optionally with parameters: Content-Type: text/html; charset=utf-8.
Why does my browser report an empty or wrong type for uploads?
+
File.type in the browser is guessed from the extension using the operating system’s list, so it is empty for unknown extensions and can differ between Windows, macOS and Linux (CSV files on Windows are often application/vnd.ms-excel). Never trust it for security; check the content on the server.
What does application/octet-stream mean?
+
It means “binary data of unknown type”. Browsers download such files instead of displaying them. Servers send it for extensions missing from their MIME table, which is why .mjs, .wasm or .webmanifest files sometimes fail to load.