MIME Type Lookup
Find common MIME types by file extension or MIME type.
Your result will appear here…
How to use MIME Type Lookup
- Enter an extension such as .json, or a media type such as application/json.
- Select Look Up.
- Copy the media type for your Content-Type header or server configuration.
Example
Input / settings:
.json
Output:
.json application/json
The result lists the extension on the first line and the media type on the second.
When to use
- Choose the Content-Type for a download or an API response.
- Check a static-file mapping in a web server configuration.
- Confirm that .mjs modules are served as text/javascript.
Overview
MIME Type Lookup searches a built-in table of 20 common web and developer file types. Enter an extension, with or without the dot, to get its media type, or enter a media type to get the first matching extension. It is a quick reference, not the IANA registry, and it says nothing about how any particular server is configured.
Supported input
extension or MIME type
Output details
MIME type details
Limitations
- Covers 20 common web and developer types. Other extensions and media types are reported as not found.
- A media type lookup returns only the first matching extension, and Content-Type parameters such as charset are not parsed.
Common mistakes
- Only 20 types are included. .md, .woff2, .webmanifest and application/octet-stream are reported as not found, which means not in this table rather than not a valid type.
- A filename gives only its last extension: archive.TXT finds .txt, while file.tar.gz looks up gz and is not found.
- A full Content-Type value is not parsed. text/html; charset=utf-8 is not found; enter text/html.
- A media type returns only the first extension in the table: image/jpeg gives .jpg although .jpeg is also listed, and text/javascript gives .js although .mjs maps to the same type.
- JavaScript is text/javascript. application/javascript is not in the table, and RFC 9239 calls the other JavaScript types historical and obsolete aliases of text/javascript.
Practical tips
- Look up by extension when you write a server mapping, and by media type when you need a file extension for a saved response.
- For a type outside the table, check the IANA media type registry.
Privacy and security
This tool runs entirely in your browser. Your input is never uploaded to our servers. The lookup uses a table bundled with the page, so nothing you type is sent anywhere. A media type describes how a client should treat content; it does not make a file safe, so validate uploads on the server instead of trusting an extension or a declared type.
References
- IANA: Media Types
- RFC 6838: Media Type Specifications and Registration Procedures
- RFC 9239: Updates to ECMAScript Media Types
- MDN: Media types (MIME types)
Frequently asked questions
How many file types does the lookup table cover?
Twenty: json, html, css, js, mjs, ts, txt, csv, xml, pdf, png, jpg, jpeg, gif, svg, webp, mp3, mp4, zip and wasm.
Is the extension lookup case-sensitive?
No. JSON, json and .TXT are all matched, with or without the leading dot.
Which extensions map to JavaScript?
Both .js and .mjs map to text/javascript in this table.