MIME Types Reference

Look up the right Content-Type for any file extension — searchable.

A searchable MIME type reference mapping common file extensions to their correct Content-Type header, from image/png and application/json to font/woff2. Copy any value with one click. Runs entirely in your browser, nothing is uploaded. It runs free in your browser on Gera Tools, with nothing uploaded.

Last updated Source: Gera Tools

What is a MIME type?

A MIME type (also called a media type or Content-Type) is a label like image/png or application/json that tells browsers and servers what kind of data a file contains so they handle it correctly.

This is a searchable reference that maps common file extensions to the correct MIME type (Content-Type). It is for web developers and server admins who need the exact header value for a given file format.

How it works

A MIME type (media type) is a label like image/png or application/json in the form type/subtype. Servers send it in the Content-Type header so browsers and clients know how to handle the response — render it, play it, or download it. The reference lists each extension with its registered type and a short description, plus a one-click copy button. Type in the search box to filter by extension, type or description.

Quick reference table

ExtensionMIME typeTypical use
.jsonapplication/jsonREST API responses, config files
.pngimage/pngLossless images, logos, screenshots
.pdfapplication/pdfDocuments; browser opens in viewer
.woff2font/woff2Modern web fonts; smaller than WOFF
.mp4video/mp4H.264 video; widely supported
.svgimage/svg+xmlScalable vector art; can embed script
.webpimage/webpEfficient raster for photos
.jstext/javascriptScripts and ES modules
.csvtext/csvSpreadsheet exports
(unknown binary)application/octet-streamForces download, no inline render

When to use application/octet-stream

This is the “I don’t know what this is” type. Sending it tells the browser to download the file rather than try to render or execute it. It is the correct fallback for:

  • Binary formats without a registered IANA type
  • Files you always want downloaded, not displayed (even PDFs when forced download is needed)
  • Proprietary file formats

Pair it with Content-Disposition: attachment; filename="file.bin" to suggest a filename.

Worked example — serving a JSON API

A common mistake is returning JSON without a declared type:

HTTP/1.1 200 OK
Content-Type: text/plain

{"status": "ok"}

This can break fetch() calls in strict environments and confuse API clients. The correct response header is:

Content-Type: application/json; charset=utf-8

The ; charset=utf-8 suffix is optional for JSON (RFC 8259 mandates UTF-8 anyway) but is good practice for any text/* type.

A note on text/javascript vs application/javascript

The IANA registry marks application/javascript as obsolete. Always use text/javascript for .js and .mjs files. HTML spec-compliant browsers require text/javascript for ES modules loaded with <script type="module">.

Setting Content-Type in common server environments

Nginx — add or check your mime.types include file:

types {
    text/javascript  js mjs;
    image/webp       webp;
    font/woff2       woff2;
}

Apache / .htaccess:

AddType text/javascript .js .mjs
AddType image/webp .webp
AddType font/woff2 .woff2

Node.js / Express:

res.setHeader('Content-Type', 'application/json; charset=utf-8');
// or using the shorthand:
res.type('json');

Vercel / Netlify _headers file:

/assets/*.woff2
  Content-Type: font/woff2

Missing or wrong MIME types are one of the most common silent failures in web deployments. If a font is not loading, a script is blocked, or a file is downloading instead of rendering, the Content-Type header is the first thing to check in your browser’s network panel.

Everything runs in your browser; nothing is uploaded.