MIME Type Lookup

Runs in your browser — your data is never uploaded.

Look up the Content-Type a file should be served with, or go the other way from a type to its extensions. Serving the wrong one is not cosmetic: with the nosniff header that every security guide tells you to set, a stylesheet sent as text/plain is refused outright and a module sent as anything but a JavaScript type throws a MIME checking error, with nothing in it to suggest the file is fine.

0 characters · runs entirely in your browser

How to use MIME Type Lookup

  1. 1

    Enter one or more file extensions, filenames, or MIME types — one per line.

  2. 2

    Read the mapping, with a note wherever the obvious answer is wrong.

  3. 3

    Copy the result into your server config or upload validation.

Share

Embed this tool on your site

Paste this where you want the tool to appear. It runs entirely in your visitor's browser — no uploads, no account, no tracking.

Please keep the attribution line — it's what keeps these tools free.

Need a different size, a dark theme, or a different tool? Build an embed lets you preview it first.

Frequently asked questions

What is the correct MIME type for JavaScript?+

text/javascript. The WHATWG specification settled on it, and application/javascript — long considered the correct one — is now obsolete though still accepted everywhere. What is not accepted is text/plain: with nosniff set, an ES module served that way is refused and the page fails with a strict MIME type error.

Is image/jpg a real MIME type?+

No. The registered type is image/jpeg, whatever the file extension says. image/jpg appears constantly in hand-written config and upload filters, and a validator checking for it rejects every genuine JPEG a browser sends.

Why does my SVG not display?+

Usually because it is served as image/svg rather than image/svg+xml. The suffix is part of the type, not decoration — it tells the browser the payload is XML. Without it, an otherwise perfect SVG renders as nothing.

What does application/octet-stream do?+

It means “arbitrary bytes”, and browsers respond by downloading rather than displaying. It is the correct fallback for a type you do not recognise, and the wrong answer for anything you want rendered — a PDF served this way downloads instead of opening in the viewer.

Should I add charset to the type?+

For text types, yes — text/html; charset=utf-8 removes any ambiguity about decoding. For JSON, no: the format is defined as UTF-8 and the charset parameter is not registered for it, so adding one is at best ignored.