📋 MIME Type Reference
Search by file extension or MIME type to find the match. Covers the most common web, image, document, audio, video and archive formats.
How the search matches
The list holds 57 rows covering 56 extensions. Your query is lowercased, one leading dot is stripped, and the remainder is tested as a plain substring against both columns - so it is a contains match, not a lookup:
"zip" -> .zip application/zip
.gz application/gzip
.epub application/epub+zip
That is why image returns every image row and .jpg
returns only one. Clear the box and the whole table comes back. A MIME type is
always type/subtype; the part before the slash is one of the nine
registered top-level types, and a vnd. or x- prefix on
the subtype marks it as vendor-specific or unregistered.
Getting the header right
- Serve text with a charset. The table gives the type only;
for HTML, CSS, JSON and CSV send
Content-Type: text/html; charset=utf-8. - Office formats are long on purpose. A .docx is a zip, but
labelling it
application/zipmakes Word refuse it - use the fullvnd.openxmlformats-officedocumentstring. - Unknown binary is application/octet-stream, which tells the browser to download rather than render.
application/javascript for .js and
application/yaml for .yaml; the entries shown here are the ones
browsers and CDNs actually send.Frequently asked questions
What is the MIME type for a JSON file?
application/json, with no charset parameter - JSON is defined as UTF-8, so adding one is redundant and some parsers reject it. JSON-LD has its own type, application/ld+json.
Is it text/javascript or application/javascript?
Both work, but the HTML specification now calls text/javascript the correct type for scripts and application/javascript obsolete. Whichever you send, the file must not be served as text/plain or the browser will refuse to run it.
Why does my file download instead of opening in the browser?
Almost always because the server sent application/octet-stream, or a Content-Disposition attachment header. Fix the type on the server; a browser trusts the header over the file extension.