MIME Type (Content-Type) Lookup ⇔ File Extension
Find the MIME type (Content-Type) for an extension such as .png, .pdf, or .json, or the extensions that belong to a MIME type. Input containing a slash is treated as a MIME type and anything else as an extension. Wildcards like image/* and partial-match search are supported. To identify a file from its actual bytes, use the File Type Detector; to inspect whole response headers, use the HTTP Header Analyzer.
🔒 Runs in your browser · Your data is never sent to a server
How to use
- Type a file extension (e.g. png) or a MIME type (e.g. image/png) into the input.
- If auto-detect guesses wrong, switch the search mode to Extension or MIME type.
- Check the exact and partial matches, and use the copy button to grab the value you need.
- Pick a category to narrow the list to images, audio, video, and so on.
Notes
- The table holds the common web, image, audio, video, document, archive, and font types. It is not an exhaustive copy of the IANA registry.
- When an extension maps to several MIME types, all of them are shown (for example xml maps to application/xml and text/xml). Which one to use depends on the context and your server configuration.
- The tool only looks up the extension/MIME table; it never inspects file contents, so it cannot confirm that a file really is the format its extension claims.
- The “Content-Type example” column adds charset=utf-8 to text/* types as a typical form. Adjust the charset to match your actual file.
Glossary
MIME type
An identifier of the form type/subtype, such as image/png, that describes a kind of data. Also called a media type; IANA maintains the registry.
Content-Type
An HTTP header that tells the receiver what kind of data the body contains. It can carry parameters after the MIME type, as in text/html; charset=utf-8.
Structured syntax suffix
The “+json” in application/ld+json: a trailing part of a MIME type that names the underlying syntax, such as JSON or XML.
application/octet-stream
A generic MIME type for arbitrary binary data of unknown kind. Browsers usually treat it as a download rather than displaying it.
FAQ
Is what I type sent to a server?
No. The lookup table is built into this page and every search runs in your browser. Nothing you enter is sent anywhere.
Which MIME type should I use for JavaScript and JSON?
Use text/javascript for JavaScript (the current standard) and application/json for JSON. Older references mention application/javascript or text/json; those are legacy spellings, so prefer the ones above for new configuration.
Why does one extension show several MIME types?
Because the same format has been labeled in more than one way over time. For example, xml maps to application/xml and text/xml, and ico to image/x-icon and image/vnd.microsoft.icon. The ts extension even collides between TypeScript and MPEG-TS video. Pick the one that fits your use.
When should I use application/octet-stream?
It is the generic type for binary data of unknown kind, or for data you want browsers to download instead of display. If you know the real type, send the matching MIME type so clients handle it correctly.
What if my MIME type or extension is not listed?
Only the major formats are included, so some are missing. A type ending in +json or +xml is a structured-syntax type, and its content format is clear from the suffix; for anything else, check the IANA Media Types registry.
Share this page
