Dev Utilities
Look up MIME types for files and extensions
MIME type lookup answers either direction from one input: an extension like png maps to its media type, and a media type like image/png maps back to its registered extensions. Developers use it before setting Content-Type headers, writing static-host configs or choosing an Accept value. Input tolerates a leading dot, letter case and charset suffixes, so text/html; charset=utf-8 still resolves, and a file name or path is read by its last extension. The bundled mime-db snapshot covers about 166 types and 283 extensions.
How to use MIME Types
- Open MIME Types in the Toolbox101 app.
- Type an extension such as
png, with or without the leading dot, into theInputbox. - Read the mapping in the
Outputbox: an extension returns its media type, for exampleExtension .png -> image/png. - Type a full media type instead, such as
text/html; charset=utf-8, to see which extensions the registry lists for it. - Or paste a file name such as
report.final.pdfand read the answer for its last extension.
Worked example
MIME Types returns the output below for this input.
Input
pngOutput
Extension .png -> image/pngCheck it yourself: open MIME Types and enter the same input.
Frequently asked questions
Where does the MIME data come from?
A snapshot of the mime-db registry (version 1.53.0) that ships with the page: roughly 166 media types and 283 extensions chosen for developer and desktop use. Every lookup is a local table read, so it works offline once the page has loaded.
What is a MIME type used for?
A MIME type, or media type, is the two-part label that identifies a file format: a type and a subtype separated by a slash, such as text/html or application/json. It is the value used in Content-Type and Accept headers so servers and clients can agree on what a body contains.
Why does my extension return Unknown?
The bundled table is a curated subset of the registry, so some real-world extensions have no entry: TypeScript's ts, Go's go, and Python's py are absent by design. An unlisted input returns "Unknown, defaulting to application/octet-stream", the honest fallback a server would apply for an unrecognized file.
How do I find the extensions for a MIME type?
Paste the media type instead of an extension. The lookup strips any ;charset parameter and returns the registered extensions for that type: image/png maps to .png, text/html maps to .html, .htm, and .shtml. The direction works because the same table is indexed both ways.
Is a MIME type the same as a file extension?
No. An extension is a filename convention, while the MIME type is the standardized format label a server declares in its Content-Type header. The mapping between them is a registry-based convention, not a guarantee: renaming a file does not change its bytes, and the header is what matters on the wire.