MIME Type Lookup
Type a file extension such as webp or docx, a file name, or a MIME type, and see the matching media types, whether each is officially registered with IANA, and the exact lines to serve it correctly from Apache, nginx or any server.
Sources
- IANA: Media Types registry (last checked 2026-11-19)
- Apache HTTP Server: mime.types (extension mapping, svn trunk r1930012, 2025-11-26) (last checked 2026-11-19)
What a MIME type is
A MIME type, also called a media type or content type, is a short label such as image/png or application/pdf that tells software what kind of data it is receiving. Web servers send it in the Content-Type header; browsers use it to decide whether to show a picture, play a video, run a script or offer a download. A wrong type causes classic bugs: a stylesheet that is ignored, a font that will not load, a JavaScript module refused by the browser, or a PDF that downloads instead of opening.
Where the answers come from
The official list of media types is kept by IANA. IANA records the type names but not a tidy extension table, so the extension mapping here comes from the mime.types file shipped with the Apache web server, which many systems reuse. Each row is marked as registered or not after comparing it with the IANA registry, and registered rows link to their official registration. A handful of registered types missing from the Apache file were added from their own registrations, such as text/markdown for .md.
Worked example
Type ico. Two rows appear: image/vnd.microsoft.icon, the registered type, and image/x-icon, an older unofficial name that many servers still send. Pick the first row to get three ready lines: the Content-Type header, an Apache AddType line for .htaccess, and the line to add to nginx’s mime.types file. New configurations should prefer the registered one.
When types matter most
- Web fonts, WebAssembly (.wasm) and JavaScript modules are strict about their types.
- Upload forms that check file types often compare against these names.
- Email attachments and APIs label their content the same way.
Limits
The lookup is by name only. If a file has the wrong extension, the answer is wrong too, because nothing inside the file is read. To see what an HTTP response code means rather than its content type, open HTTP Status Codes; to embed a small file directly in code, see Base64 Encode and Decode.
How to use MIME Type Lookup
- Type an extension, a file name or a MIME type, or choose a file to look up its name.
- Pick the matching row; officially registered types are listed first.
- Copy the Content-Type header or the Apache or nginx line for your server.
Privacy: how it works
Everything happens in your browser. If you choose a file, only its name is used; it is not read or uploaded.
Frequently asked questions
Where does the list come from?
The extension list is the mime.types file of the Apache web server, cross-checked against the official IANA media types registry, plus a few registered types whose registration names the extension.
Why do some extensions show two types?
Some formats were used under an unofficial name (often starting with x-) before an official type was registered, for example .ico or .flac. Prefer the registered one unless old software needs the other.
Does it check what is really inside my file?
No. It looks at the file name only, and the file is never read or uploaded. A wrong extension gives a wrong answer.