MIME type lookup

Look up the Content-Type for a file extension, or the extensions for a MIME type.

Runs in your browser. Your input is not uploaded.

Loading the tool…

What it does

A MIME type (media type) tells the browser what a response is, in the Content-Type header: text/html, application/json, image/webp. Browsers rely on it more than on the file extension.

Search by extension or type. The list covers the formats a web server is likely to serve.

How to use it

  1. Type an extension such as .webp or a type such as application/json.
  2. Copy the type or the matching extensions.

Things to watch for

  • Serve JavaScript as text/javascript. application/javascript is obsolete, and modules with a wrong type are refused.
  • With X-Content-Type-Options: nosniff, a wrong type stops scripts and stylesheets loading.
  • Add ; charset=utf-8 for text types if the server does not.

Questions

What is the MIME type for JSON?
application/json. It has no charset parameter because JSON is always UTF-8.
What should unknown files use?
application/octet-stream. Browsers download it rather than trying to display it.
What is the type for .wasm?
application/wasm. Streaming compilation fails without it.
Is image/jpg valid?
No. The registered type is image/jpeg.