Skip to content
OddsockLocal
Local
Source text

The preview shows up here.

ReadyRuns in this browser. Nothing is uploaded.

How to use

  1. Type an extension, a filename, or a media type. A charset parameter is fine.
  2. Read the type and the extensions on that row.
  3. If several rows appear, the extension is used by more than one type.
  4. A miss means the offline index does not know that name. It does not mean the file is unsafe.

What is MIME type lookup?

MIME lookup is an offline table of media types and the extensions that go with them. photo.JPEG matches image/jpeg, and the extensions listed are jpeg, jpg and jpe. The match uses the last suffix, so a longer filename still resolves, and the case of JPEG does not matter. application/json; charset=utf-8 matches application/json and the extension json, because the parameter after the semicolon is stripped before the lookup.

Read more

You can search by extension or by the full type. A type that the table does not contain, or an extension it has never mapped, is an error that says the offline index has no match. Some extensions belong to more than one type, and those rows all come back. The table is the Apache httpd list plus a set of modern web types. It is not a scan of a file’s bytes. The file-type detector is the tool that reads a signature instead of a name.

Empty input lists the index, which is long. Type the extension or the type you actually need.

Use cases

  • A file named photo.JPEG should be served as image/jpeg, and you want jpeg, jpg and jpe confirmed as the same type.
  • A Content-Type with charset=utf-8 should still find application/json and the json extension.
  • You have an extension and you need the type before setting a download header.
  • You have a type and you need the extensions a file picker should offer.

A JPEG named with a capital suffix

photo.JPEG

image/jpeg jpeg, jpg, jpe

Why use Oddsock

The suffix is the lookup, not the whole filename. photo.JPEG and scan.jpeg are the same row.

Related tools

Using this tool

image/jpeg. The extensions on that row are jpeg, jpg and jpe. Capital letters in the filename do not matter.