Saved

Press the star next to a tool's name to save it.

All my tools

MIME Type Lookup

Use this mime type lookup to find the media type for a file extension such as pdf or png, or the extensions that belong to a type such as image/jpeg.

Type a file extension, a file name or a media type such as image/png. You can also type a word such as video or spreadsheet to list related types.

The list is built into this page. Nothing you type is sent anywhere.

Matching media types

No media type matches. Try an extension such as png or a type such as application/json.

A MIME type lookup turns a file extension into the media type a server should send, and a media type back into the extensions that use it. Web servers, upload forms, email clients and APIs all describe content with a type and subtype such as image/png or application/json. Type pdf, .jpg, a file name or a full type, and this page lists the matching entries with a short description.

The data comes from the list of common types on MDN [2], with a few widely used types added, such as HEIC, YAML, FLAC and QuickTime video. The official home of media types is the IANA registry [1], which is where new types are registered and where you should check a vendor-specific or unusual type.

How to use the MIME type lookup

  1. Type an extension with or without the dot, such as pdf or .pdf.
  2. Or type a file name such as report.final.docx; only the part after the last dot is used.
  3. Or type a media type such as image/jpeg to see every extension that uses it.
  4. Or type a word such as video, font or spreadsheet to list related types.
  5. Press Clear to see the full list again.

What a MIME type is made of

A media type has a top-level type, a slash and a subtype, and sometimes parameters after a semicolon, for example text/html; charset=utf-8. The registry groups types under top-level names such as application, audio, font, image, model, text and video [1]. The subtype names the exact format, and a plus sign marks a structured syntax, so image/svg+xml is an image that is also XML and application/ld+json is JSON-LD.

Top-level typeUsed forExamples
textHuman-readable texttext/html, text/css, text/csv
imagePictures and graphicsimage/png, image/webp, image/svg+xml
audioSoundaudio/mpeg, audio/wav
videoMoving picturesvideo/mp4, video/webm
fontFont filesfont/woff2, font/ttf
applicationEverything else, often binary or structured dataapplication/pdf, application/json, application/zip

Why the right type matters

The server sends the type in the Content-Type header, and the browser uses it to decide what to do with the response: show it, play it or offer a download. A style sheet served as text/plain may be ignored, a script served with the wrong type may be blocked, and a download served as application/octet-stream is treated as unknown binary data, which is how the MDN list describes any binary data [2]. When you configure a server, set the type for each extension you serve, and when you accept uploads, check the declared type but do not trust it alone.

Worked example: serving a web font

You add a WOFF2 font to a site. Look up woff2 and you get font/woff2. If the server sends the wrong type, or none, some browsers refuse the font or show a warning. In an Apache configuration the fix is one line that maps the extension to the type, and in other servers it is the same idea in a different syntax. The lookup gives you the exact string to paste.

Notes on a few extensions

  • .js and .mjs use text/javascript, which is the current standard type for JavaScript.
  • .xml is usually application/xml, although text/xml is still seen.
  • .ico is image/vnd.microsoft.icon, and some servers also use image/x-icon.
  • .mid and .midi are audio/midi, with audio/x-midi also in use.
  • .docx, .xlsx and .pptx have long vendor types that start with application/vnd.openxmlformats-officedocument.
  • .zip is application/zip, though Windows may upload a zip as application/x-zip-compressed.

Using the lookup in server and upload settings

When you configure a web server, each file extension you serve needs a type. Look up the extension, copy the media type and add it to your server’s type mapping. Do the same for the Content-Type header in an API response: a JSON API should answer with application/json, and a CSV download with text/csv. Setting the right header lets the browser treat the response correctly.

For file uploads, the accept attribute of a file input can list extensions or types. A list such as .pdf, image/png lets visitors pick only those files in the dialog. The lookup helps you write that list without errors, but always check uploaded files on the server too, because the type a browser reports can be wrong or changed.

  • Use text/csv for CSV downloads and application/json for JSON data.
  • Prefer the wildcard form such as image/* in an accept attribute when any image will do.
  • Match the extension of the saved file to the type you send, so downloads open in the right program.

Common mistakes

  • Using the extension alone to decide security: a file named photo.png can hold anything.
  • Forgetting the charset for text types such as text/html; charset=utf-8.
  • Inventing types that start with x- when a registered type exists.
  • Assuming one extension means one type: some formats, such as MIDI or Ogg audio, have several in use.

The list is meant for quick reference. For a type that is not here, the IANA registry [1] is the place to check whether it is registered.

What next

Use this often? Add MIME Type Lo to your Home screen.

Frequently asked questions

What does a MIME type lookup do?

It finds the media type that belongs to a file extension, such as image/png for .png, and the extensions that belong to a media type.

What is the MIME type for a PDF?

application/pdf. Look up pdf to see it with its description.

What does application/octet-stream mean?

It means any binary data of unknown type. Servers use it as the default when they have no better type, and browsers usually offer to download such a file.

Where does the data come from?

From the common MIME types list on MDN, with a few widely used types added. The IANA media types registry is the official source for registered types.

Is anything I type sent to a server?

No. The list is part of the page and the search runs in your browser.

What went wrong?

We only receive the reason you pick, never what you typed into the tool.

Thanks for your feedback.

More Developer Tools