Tooleux

MIME Type Lookup

Look up MIME types by extension or filename, or list the extensions registered for a MIME type. Batch queries supported.

Runs in your browser. Nothing leaves your device.
Look up the MIME type for any file extension, or find extensions for a MIME type. Complete IANA registry. Runs in your browser. Read more Show less

What is a MIME type?

A MIME type is a two-part label that identifies the format of a piece of data. The first part is the category - text, image, application, audio, video, multipart. The second part is the specific format - html, png, json. Together they read as type/subtype.

MIME types are used by browsers, email clients, HTTP servers, and APIs to decide how to handle data: render it, download it, execute it, or reject it. The full list is maintained by the IANA in the Media Types registry.

The mapping from file extension to MIME type is a convention, not a rule. A file named photo.png is not required to be a PNG image - the extension is a hint. Servers and browsers trust the extension for well-behaved content and fall back to magic-byte sniffing when it matters.

How to use

Enter one query per line. Each line can be a file extension, a full filename, or a MIME type. The direction is detected automatically:

  • If the line contains a /, it is treated as a MIME type, and the tool lists the extensions registered for it.
  • Otherwise it is treated as an extension or filename, and the tool returns the MIME type.

You can also force a direction with the setting below the run button. Use "Extension to MIME" if every line is a filename, or "MIME to extensions" if every line is a MIME type.

Common MIME types

Some entries that come up regularly:

  • .html maps to text/html
  • .css maps to text/css
  • .js maps to text/javascript per the WHATWG living standard; older registrations list application/javascript
  • .json maps to application/json
  • .png maps to image/png
  • .jpg and .jpeg map to image/jpeg
  • .svg maps to image/svg+xml
  • .pdf maps to application/pdf
  • .zip maps to application/zip

Charsets and parameters

A MIME type can carry parameters, most commonly charset. For text formats, text/html; charset=utf-8 tells the recipient how to decode the bytes into characters. The charset is not part of the MIME type itself - it is an annotation.

This tool reports the bare MIME type. It does not guess a charset, because the correct charset depends on the actual file contents, not on the extension.

Source of the data

The lookup table is the IANA Media Types registry, mirrored through the mime-db package. That registry is updated as new formats are standardized; this page ships the version current at build time.

Where multiple MIME types share an extension, the tool returns the IANA-registered one. Vendors sometimes claim the same extension with their own types - for example, Microsoft's application/x-msexcel for .xls - and those are present in the source data but not preferred here.

A few extensions have two IANA-registered MIME types competing for them. For the most common cases - .mp4, .mts, .mpp, .xsl - the tool pins the interpretation people expect rather than the registry's insertion order. The override list is short and explicit in the tool's source.

FAQ

Why does .js map to text/javascript and not application/javascript?

Both are registered. The WHATWG living standard and modern browsers use text/javascript as the primary type. The older application/javascript registration remains valid for compatibility, but text/javascript is the current recommendation. Depending on which version of the IANA registry is bundled with this tool, the returned value may be either - both are correct.

My extension is not found. Why?

The extension may be unregistered, or registered under a name the lookup table does not map. Try searching the MIME type directly if you know it, or check the IANA registry to see whether the format has an entry.

Does this tool upload my files?

No. Nothing is uploaded, because no file is read. The input is text - an extension or a MIME string - and the lookup happens entirely in your browser. The lookup table is loaded from this domain the first time you use the tool.

Is the result authoritative?

It reflects the IANA registry. That is the canonical reference for MIME types. Where the registry is silent, the tool returns (unknown) rather than guessing.

Can I query multiple types at once?

Yes. Each line in the input is treated as a separate query. Blank lines are skipped.

Command line equivalent
# Python (standard library)
python3 -c "import mimetypes; print(mimetypes.guess_type('photo.png')[0])"

# Node (mime-types package)
npm i mime-types
node -e "console.log(require('mime-types').lookup('photo.png'))"

# file (BSD, macOS)
file --mime-type -b photo.png

# file (GNU coreutils, Linux)
file --mime-type -b photo.png

# curl (reads the server's Content-Type header)
curl -sI https://example.com/photo.png | grep -i content-type
Loads a test value into the form
Query (one per line)
Result