Tools
Guides

MIME / Content-Type Reference

Reference

Lookup table of common MIME types and their file extensions, with search.

100% client-side No backend
Content-Type Extensions Category Description
On this page

What is a MIME type reference?#

A MIME type (also called a media type or Content-Type) is the short label that tells the receiver what kind of bytes a document contains: text/html is a web page, application/json is JSON data, image/png is a PNG picture. The format is always type/subtype — a broad category, a slash, then a specific name. HTTP relies on these labels to decide whether to render, download, parse, or reject a response; browsers rely on them to pick the right handler (an <img> expects an image type, a <script> expects a JavaScript type); email relies on them to attach files.

The format looks simple, but the landscape is genuinely confusing. There are seven top-level categories (application, audio, font, image, model, text, video), many files match several extensions (.jpg, .jpeg, .jpe are all image/jpeg), some types have an old and a modern form (application/javascript versus text/javascript), and choosing the wrong one causes real bugs — a stylesheet served as text/plain will not apply, a font served as application/octet-stream will not load. This page is a searchable lookup so you always pick the right label.

How to use it#

  1. Search by anything. The search box filters the whole table. Three ways to query:
    • Type a file extension with a leading dot — .jpg, .woff2, .mp4 — and you get exactly the types mapped to that extension.
    • Type the type or subtype itself — image, json, svg — to narrow by name.
    • Type a wordarchive, font, spreadsheet — to search the descriptions.
  2. Read the row. Columns are Type (the full type/subtype), Extensions (the common file suffixes that map to it), Category (one of the seven top-level groups), and Description (a one-line note on what the type is for).
  3. Pick the right one. For a given extension there is usually one canonical type; where two exist (the JavaScript case is the classic), the description explains which is current.

Key features#

  • Seven categories, one table. Application, audio, font, image, model, text, and video types all live together, so you can jump from a font question to a video question without changing pages.
  • Extension-first lookup. The common real-world task is “I have a .xlsx file, what do I set as Content-Type?” — typing .xlsx lands directly on application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.
  • Both the modern and legacy names. Where a type has an old form still seen in the wild, both are listed with a note, so you recognize either direction of an HTTP header.
  • Vendor types included. Microsoft Office, ZIP, gzip, 7z, RAR, WebAssembly, Web App Manifest, GraphQL — the long application/vnd.* and application/*+json/application/*+xml forms are all there.
  • Local and instant. The dataset is embedded in the page; every search is a client-side filter with no request.

Worked example#

JavaScript is the single most confusing entry, because the type has changed names over the years and servers still send both. Search javascript and you get two rows:

  • text/javascriptjs, mjs — “the standard, modern MIME type.”
  • application/javascriptjs — “legacy JavaScript MIME type (still widely seen).”

The short version: text/javascript is what the current HTML and Fetch standards tell you to use, and what modern servers emit; application/javascript is the older RFC 4329 name that you will still see in older Content-Type headers and older documentation. They mean the same thing and browsers treat them identically — but for a new server configuration, prefer text/javascript.

A few more lookups worth memorizing, all one search away:

  • .jsonapplication/json
  • .svgimage/svg+xml (it is an image, but the +xml suffix flags it as XML-based)
  • .woff2font/woff2 (note the dedicated font/ top-level category, not application/)
  • .wasmapplication/wasm (WebAssembly binary — must be served exactly this, with no charset, or it will not compile)
  • .pdfapplication/pdf

When a type is unknown, servers fall back to application/octet-stream — the generic “this is some binary data, do not assume anything” type. Browsers usually respond by downloading the file instead of trying to display it.

FAQ#

text/javascript or application/javascript — which do I use?#

For new code, send text/javascript. It is what the current WHATWG HTML and Fetch specifications require, and what browsers actually check against when deciding whether to execute a <script>. application/javascript still works everywhere (it is the older standard), but it is the legacy form. If you are configuring a new server, mime database, or build tool, default to text/javascript.

Why does SVG have +xml in its type?#

The +xml suffix is a structured-syntax suffix: it tells you the type’s serialization is XML underneath. So image/svg+xml means “an image, specifically one described in XML.” The same convention appears in application/ld+json (linked data, serialized as JSON) and application/graphql+json. Tools that understand the suffix can fall back to a generic XML or JSON parser.

What is application/octet-stream for?#

It is the catch-all for “arbitrary binary data, unknown type.” Servers return it when they cannot identify a file, and the safe client behavior is to download it rather than try to render or execute it. If you ever see a file you expected to open in the browser instead start downloading, a wrong or missing Content-Type (collapsing to octet-stream) is the usual culprit.

How do I actually set a Content-Type on my files?#

That depends on where the file is served from — a static file server reads it from the extension via a mime database, a web framework sets it in code (often response.setContentType(...) or a header assignment), and a CDN exposes it in the upload or object metadata. The exact call differs per stack; the only thing that has to be right is the final string on the wire, which is exactly what this lookup gives you.