piapia123
en

MIME Type Lookup

Web & Network

Everything runs locally in your browser — nothing is uploaded

Input
Output

Convert between file extensions and media types: js gives you text/javascript, and image/svg+xml gives you the default extension .svg. Values come from the IANA registry, filled in with the de-facto entries shipped in nginx and Apache configs that were never registered but everybody uses. Only the types you actually meet day to day are here — the IANA registry alone has over two thousand — so a miss does not mean the type is not real, and the result says so explicitly.

Features

  • Both directions: extension to media type, and media type to default extension
  • Paste a whole filename if you like — app.min.js is read as .js — with case, leading dots and query strings ignored
  • Lists every extension a type covers, such as jpg, jpeg, jpe and jfif for image/jpeg
  • Notes on the entries that trip people up: the obsolete type for js, the registered name for ico, ts colliding with TypeScript
  • Optionally appends charset=utf-8 to text types, ready to paste into a Content-Type header
  • Suggests near matches by edit distance instead of just saying "not found"
  • States the data source and the number of entries whenever nothing matches

How to use

  1. Type an extension (js, .png, app.min.js) or a media type (text/html)
  2. The direction is detected for you — anything with a slash is a media type — or set it explicitly
  3. Tick the charset option when you need a complete Content-Type value
  4. The result appears as you type — no button to press

FAQ

How many types are covered, and where does the data come from?
Around a hundred entries, taken from the IANA media type registry plus the de-facto but unregistered values in nginx and Apache defaults — application/x-tar and application/x-sh being the usual examples. The IANA registry alone holds over two thousand entries, so this covers what you meet day to day rather than everything. When nothing matches, the result says so and offers the closest candidates.
Why is js text/javascript and not application/javascript?
RFC 9239 made text/javascript the single recommended type for JavaScript; the older application/javascript is obsolete. It still appears in a great many old configs and CDN defaults, so you will meet both — when you need to satisfy a legacy system, go with what that system expects.
Why does ts come back as a video type?
In server default tables .ts is an MPEG transport stream, video/mp2t. TypeScript source files use the same extension, and a static server has no way to know the difference — serve .ts source directly and the browser gets video/mp2t, which is the classic incident with this extension. Compile your sources and serve the .js output instead.
Why is svg typed as image/svg+xml?
An SVG is XML text at heart. By the naming rules for media types, the +xml suffix says "this is an XML-based format", giving image/svg+xml. It is also genuinely an image, which is why the top-level type is image rather than application.
When is the charset option useful?
When you are assembling a complete Content-Type response header. It applies to text types only: JSON is defined to be UTF-8 and XML carries its own encoding declaration, so adding charset to either is redundant at best — the tool leaves them alone and tells you why.

Related tools