API & Web

MIME Type Lookup

Maps file extensions to Content-Type values and back, with notes on the ones people get wrong.

Loading the tool…

Processing happens locally in your browser. What you paste or load is processed by this page and is not uploaded to a server. Nothing is stored unless you use a control that says it stores something, and you can clear anything this site has kept from the privacy page.

How to use this tool

  1. Type extensions, media types, or a mix of both.
  2. Select Look up.
  3. Read the note column — several of these types are commonly served wrongly, and the note says how.
  4. Set the type in the Content-Type header, not just on the filename. The header is the part the browser obeys.

What mime type lookup does

Search by extension or by media type, several at once, in either direction. The notes are the reason to use this rather than a bare list: JSON takes no charset parameter, CSV usually needs one, SVG is XML that can carry script and should never be served unsanitised from a user upload, and Parquet is registered but still commonly served as octet-stream.

What the browser obeys is the Content-Type header, not the file extension. That is the whole explanation for a correctly named .csv that downloads as a text file, or a stylesheet the browser silently refuses to apply — the name on disk was right and the header was wrong. Unknown types fall back to application/octet-stream, which is what makes a browser offer a download.

Frequently asked questions

Almost always because the Content-Type header says application/octet-stream, or says text/csv without a charset the browser accepts. The extension on the file has no bearing on it — the header is what the browser obeys, and octet-stream means "unknown binary", which triggers a download.

No. The JSON media type has no charset parameter defined, because JSON is always UTF-8 by specification. Adding one is harmless but pointless. CSV and plain text are the opposite case: there a charset is worth stating, because without it some clients still assume a legacy code page.

Because an SVG is an XML document that can contain script, and a browser will execute it when the file is loaded as a document rather than in an img tag. An SVG accepted from a user upload and served back from your own origin is a stored cross-site scripting vector unless it has been sanitised.