MIME Type Lookup
Find the MIME type for any file extension, and vice versa.
41 of 41 types
| Media type | Extensions | Name |
|---|---|---|
text/plain | .txt .log | Plain text Text |
text/html | .html .htm | HTML Text |
text/css | .css | CSS Text |
text/csv | .csv | CSV Text |
text/markdown | .md .markdown | Markdown Text |
text/calendar | .ics | iCalendar Text |
text/xml Prefer application/xml unless the content is meant to be human-readable. | .xml | XML (as text) Text |
application/json There is no "text/json" — application/json is the only registered type. | .json | JSON Application |
application/ld+json What structured data on a web page uses. | .jsonld | JSON-LD Application |
application/javascript text/javascript is also valid and is what the HTML spec now prefers. | .js .mjs | JavaScript Application |
application/xml | .xml | XML Application |
application/pdf | PDF Application | |
application/zip | .zip | ZIP archive Archive |
application/gzip | .gz | Gzip Archive |
application/x-tar | .tar | Tar archive Archive |
application/wasm | .wasm | WebAssembly Application |
application/octet-stream The fallback when nothing more specific is known. Triggers a download in browsers. | .bin | Arbitrary binary Application |
application/x-www-form-urlencoded The default for an HTML form without enctype. | — | Form data (URL-encoded) Application |
multipart/form-data Required for file uploads. | — | Form data (multipart) Application |
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet | .xlsx | Excel workbook Application |
application/vnd.openxmlformats-officedocument.wordprocessingml.document | .docx | Word document Application |
application/vnd.api+json | — | JSON:API Application |
image/png | .png | PNG Image |
image/jpeg The type is image/jpeg even for a .jpg file — there is no image/jpg. | .jpg .jpeg | JPEG Image |
image/gif | .gif | GIF Image |
image/webp | .webp | WebP Image |
image/avif | .avif | AVIF Image |
image/svg+xml SVG can contain scripts — never serve user-uploaded SVG from your main origin. | .svg | SVG Image |
image/x-icon | .ico | Icon Image |
audio/mpeg | .mp3 | MP3 Audio |
audio/ogg | .ogg .oga | Ogg audio Audio |
audio/wav | .wav | WAV Audio |
audio/webm | .weba | WebM audio Audio |
video/mp4 | .mp4 .m4v | MP4 Video |
video/webm | .webm | WebM Video |
video/quicktime | .mov | QuickTime Video |
application/vnd.apple.mpegurl | .m3u8 | HLS playlist Video |
font/woff2 The only web font format worth serving today. | .woff2 | WOFF2 Font |
font/woff | .woff | WOFF Font |
font/ttf | .ttf | TrueType Font |
font/otf | .otf | OpenType Font |
About the MIME Type Lookup
Find the correct Content-Type for any file extension, or work out what an unfamiliar media type refers to. Getting this wrong is why a download arrives as a text file, a font is refused, or a browser renders your JSON as a page.
How to use it
- 1 Type a file extension such as .webp, or a media type such as image/.
- 2 Matching entries appear immediately.
- 3 Copy the exact string for your Content-Type header.
- 4 Read the notes on the types that are commonly written incorrectly.
What it does
- Common types across text, image, audio, video, fonts, archives and applications
- Search by extension or by media type
- Notes on the types people routinely get wrong
- Covers form encodings and the Office XML types
Frequently asked questions
Is it image/jpg or image/jpeg?
image/jpeg, always — even for a file named .jpg. There is no registered image/jpg type, and some strict parsers reject it.
Should JSON be application/json or text/json?
application/json. It is the only registered type, and text/json has never been valid. Browsers and most frameworks will still work with the wrong one, which is exactly why the mistake persists.
When should I use application/octet-stream?
When the content is genuinely unknown binary, or when you want to force a download rather than have the browser try to display the file. Using it for a known type stops browsers doing anything sensible with the content.
Why does my SVG upload get rejected?
Because SVG is XML that can contain scripts, so an SVG uploaded by a user is an XSS vector if served from your own origin. Serve user-supplied SVG from a separate domain, sanitise it, or convert it to a raster format.
What is the difference between the two form encodings?
application/x-www-form-urlencoded is the default for an HTML form and encodes fields like a query string — compact but unable to carry binary. multipart/form-data splits the body into parts and is required for file uploads.