MIME Type Lookup: Find the Content-Type for Any File Extension

MIME Type Lookup: Find the Content-Type for Any File Extension

A MIME type is the label that tells a browser or server what kind of file it is dealing with, like application/json or image/webp. If you need to look up the MIME type for a file extension, or work backward from a type to its extensions, here is how it works and how to find the right value fast.

What a MIME type is

A MIME type (also called a media type or content type) describes the format of a file in a short, standardized string. It always follows a type/subtype shape. The first part is the broad family, and the second part is the specific format:

  • application/json for JSON data
  • image/webp for WebP images
  • font/woff2 for web fonts
  • application/octet-stream for unknown or raw binary data

The type is one of a small set (text, image, audio, video, application, font, and a few more), while the subtype is far more specific. There are hundreds of registered subtypes, which is exactly why a searchable reference beats memorizing them.

Where the MIME type shows up

The most common place is the Content-Type header. When a server sends a file, it includes a line like Content-Type: application/json so the browser knows how to handle the response. The same header appears on file uploads and API requests.

This matters because the wrong MIME type breaks things. If a server labels a JSON response as text/plain, a strict client may refuse to parse it. If an image is served as application/octet-stream, the browser downloads it instead of rendering it inline. Getting the Content-Type right is often the difference between a file displaying and a file silently failing.

Look up a MIME type in three steps

The MIME Type Lookup tool gives you a full searchable table of 300+ types, both directions at once.

  1. Open the MIME Type Lookup tool.
  2. Type a file extension like woff2 to see its MIME type, or type a MIME type like image/webp to see its extensions.
  3. Copy the exact value and drop it into your Content-Type header or server config.

Everything runs in your browser. No file or query is sent to a server, so it works offline and stays private.

A note on security

Never trust a file extension to decide what a file actually is. A .jpg can contain anything. When you accept uploads, validate the real content type server-side by inspecting the file, not by reading the extension a user typed. Use this lookup as a reference for setting correct headers, not as your only line of defense.

Find the extension, find the type, copy the right Content-Type, and stop guessing.

← All posts