Find the MIME type for a file extension
A download comes back as application/octet-stream, or an upload form rejects your file. Here is how to find the right Content-Type value fast.
Tools used in this guide
The job
Servers describe file kinds with MIME types like image/webp or application/pdf. You need the value when writing an upload accept list, setting a Content-Type header, or debugging a download that opens as a generic blob.
Look it up
Open the MIME type reference and type the extension or a keyword. The table shows the MIME type, common extensions, and a short note. Filter by kind — image, audio, video, text, application — when the search is broad.
- Extension → type: search .webm to get video/webm.
- Type → extensions: search video/mp4 to see .mp4 and .m4v.
- The same extension can legitimately map to different types across systems; when in doubt the file signature inspector shows the real bytes.
Worked example
An HTML <input accept=…> should take .heic photos from iPhones. Searching 'heic' returns image/heic (and its sibling image/heif), so accept="image/heic,image/heif" covers both spellings iOS actually uses.
Limits
The list is curated to common types — it is not the full IANA registry and does not sniff file contents. Two different files can share one extension; when the bytes themselves matter, inspect them with the hex viewer or file signature tool.