File Extension by MIME Type Lookup
Type a MIME type such as image/png or application/pdf and read back the matching file extension from a table of 24 common web content types.
Extension
—
From MIME type to file extension
The MIME type is what tells a browser what to do with the content it received. It travels in Content-Type and has no required relationship to the filename extension — the server decides. When the two disagree, the familiar problems appear: the CSS that is not applied, the script the browser refuses to run, the PDF that opens as text.
Enter the type and the page returns the conventional matching extension, covering what shows up in day-to-day web work: text and data formats, images, fonts, the most common audio and video, and wasm. It is the lookup that solves the practical case of saving a file under the right name when all you have is the response header.
Two things to keep in mind. The relationship is not one to one: the same type accepts more than one extension, such as jpg and jpeg, and the same extension has travelled under different names over the years — JavaScript was text/javascript, then application/javascript, and the current specification went back to text/javascript. And the header can carry parameters after a semicolon, such as charset, which are not part of the type itself.
Frequently asked questions
Why is my CSS not being applied?
Is there a generic type when I do not know which to use?
Can I trust the type declared on upload?
Related Tools
MIME Types (Reference)
Searchable MIME type table — search by extension (.json, .pdf) or MIME (application/json, image/png). Includes common formats for web, audio, video, fonts and documents. Everything in your browser.
MIME Type by File Extension
Type an extension such as json, webp, woff2 or mp4 and get the content-type value, from a table of 38 entries that falls back to application/octet-stream.
Content-Type Parser
Decompose a Content-Type header into mediatype, charset, boundary and other parameters. Useful when debugging APIs and uploads.
Data URI Parser
Break a data: URI into mediatype, parameters, base64 flag and payload. Shows decoded byte size of the content.
Zalgo Text Generator
Generate creepy Zalgo text with overlapping diacritical characters. Control the intensity of the effect.
TypeORM Init Generator
Generate a starter TypeORM data-source.ts with a ready PostgreSQL connection, in TypeScript. Copy the file and start using entities and migrations.