Your country

Tools that support it use your country for local currency, number formats, units and paper size. Your choice is saved only in this browser.

Type a name or a two-letter code. Use the up and down arrow keys to move through the countries, Enter to choose one and Escape to close.

MIME Type Lookup

The right Content-Type for any file — and whether a file really is what its name says.

Developer No upload Works offline Free, no sign-up

Look up a MIME type

A whole Content-Type value with parameters (e.g. text/html; charset=utf-8) is checked too.

Try:

Check a file: extension versus content

Common web types

Extension, MIME type and Content-Type header for common web files
ExtensionContent-Type
text/html; charset=utf-8
text/css; charset=utf-8
text/javascript; charset=utf-8
text/javascript; charset=utf-8
application/json
application/xml
text/plain; charset=utf-8
text/csv; charset=utf-8
text/markdown; charset=utf-8
image/svg+xml
image/png
image/jpeg
image/gif
image/webp
image/avif
image/vnd.microsoft.icon
font/woff2
font/woff
font/ttf
font/otf
video/mp4
video/webm
audio/mpeg
audio/ogg
audio/wav
application/pdf
application/zip
application/gzip
application/wasm
application/manifest+json
application/vnd.openxmlformats-officedocument.wordprocessingml.document
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
application/vnd.openxmlformats-officedocument.presentationml.presentation
application/epub+zip
application/vnd.android.package-archive
All 2,697 media types with their IANA status and Apache, nginx and mime-db extensions.

Data: IANA Media Types registry, Apache httpd mime.types, nginx mime.types and mime-db 1.54.0.

Next steps

About the MIME Type Lookup

Type a file extension (.webp), a file name (holiday photo.jpg), a path or URL, a MIME type (application/json) or just a word (excel) to see which media types and extensions belong together — side by side as the IANA registry, Apache httpd, nginx and mime-db (the list Express and many Node.js libraries use) define them. The page shows where they disagree: nginx’s default mime.types still maps .js to application/javascript (which IANA has obsoleted in favour of text/javascript) and has no entry for .mjs at all.

You also get the exact Content-Type header to send, with a charset only where one belongs, plus ready-made configuration lines for nginx, Apache and IIS. Check a file reads the first bytes of any file and compares the format they reveal (its "magic number") with what the extension claims — catching PNGs saved as .jpg, renamed archives and disguised executables. Files are read locally and never uploaded.

How to use it

  1. Type an extension, a file name, a MIME type or a word in the box — results appear as you type. Press a Try button for a quick example.
  2. Read the recommended type and the Content-Type header; press Copy header to copy it.
  3. Where sources disagree, the table lists every type that uses the extension and who maps it. Open Server configuration for nginx, Apache and IIS lines.
  4. To check real files, drop them on Check a file (up to 20). Each gets a verdict: match, mismatch, ZIP-based container, or text without a signature.

Examples

JavaScript modules
Input
.mjs
Result
.mjs → text/javascript · Content-Type: text/javascript; charset=utf-8

Apache maps .mjs; nginx’s default mime.types does not, so it serves module files with its default type — browsers refuse to run module scripts whose MIME type is not a JavaScript type.

JSON
Input
application/json; charset=utf-8
Result
Content-Type: application/json — RFC 8259 defines no charset parameter; JSON is always UTF-8.
A photo with the wrong extension
Input
holiday.jpg (dropped)
Result
Mismatch: the extension .jpg says image/jpeg, but the content is PNG image (image/png) — the usual extension is .png.

Common uses

  • Configuring a web server or CDN to send the right Content-Type for fonts, WebAssembly, web app manifests or modern image formats.
  • Fixing “Failed to load module script: wrong MIME type” and other X-Content-Type-Options: nosniff errors.
  • Setting the type of uploads in S3, Cloudflare R2 or an API response.
  • Finding out what a file without an extension (or with a suspicious one) really is before opening it.
  • Looking up the official IANA registration and RFC for a media type.

Why the sources disagree

The IANA registry is the official list of media types (RFC 6838), but a registration only sometimes names file extensions. Web servers ship their own extension maps: Apache httpd’s mime.types lists hundreds of types, nginx’s default file about 80, and mime-db combines IANA, Apache, nginx and its own research. They are updated at different speeds: RFC 9239 made text/javascript the recommended JavaScript type, and Apache’s current list maps .js to it, while nginx’s default map still says application/javascript. Unregistered names such as image/x-icon live on because servers have always sent them. The page recommends the registered type that most sources agree on and shows the alternatives, so you can match what your clients expect.

Charset: when to add it

  • Text types (text/html, text/css, text/javascript, text/csv…): add ; charset=utf-8 — RFC 6838 §4.2.1 makes UTF-8 the recommended default, and without it browsers have to guess.
  • JSON (application/json, +json types): no charset; RFC 8259 §11 says it has none and JSON is always UTF-8.
  • XML (application/xml, image/svg+xml, +xml types): the XML declaration states the encoding; RFC 7303 §3.1 warns against server-wide charset defaults.
  • Binary formats (images, audio, fonts, archives): never.

How the file check works

Most binary formats start with a fixed signature: PNG with 89 50 4E 47, PDF with %PDF-, ZIP with PK. The check compares the first 64 KB of each file against the patterns of the WHATWG MIME Sniffing Standard and other published signatures, looks inside ZIP files (DOCX, XLSX, EPUB, JAR and APK are ZIPs), and decodes text to tell UTF-8 from other encodings. Only the first and last 64 KB are read, so even very large files are checked instantly.

Limitations

  • Plain-text formats (CSV, JS, CSS, Markdown, YAML and so on) have no signature: for them the extension is the only evidence, and the check says so.
  • Some signatures are shared: old Office files (DOC, XLS, PPT) and MSI installers are all “compound files”, and many camera RAW formats are TIFF inside.
  • The data is a snapshot (see the date under the table); new IANA registrations appear here when the snapshot is refreshed.
  • A matching signature shows what a file’s format is, not that it is safe to open.

Privacy

Everything happens in your browser. What you enter or open here is not uploaded or stored by MySmartCoPilot.

Frequently asked questions

What is the MIME type for JavaScript?

text/javascript. RFC 9239 made it the standard type and marked application/javascript and the other old names obsolete. Send Content-Type: text/javascript; charset=utf-8 for both .js and .mjs files.

What is the difference between a MIME type and a Content-Type?

A MIME type (officially a media type) such as text/html names a format. Content-Type is the HTTP header that carries it, optionally with parameters such as charset=utf-8 (RFC 9110 §8.3).

Why does my browser refuse a file even though it downloads?

With X-Content-Type-Options: nosniff, browsers refuse scripts and style sheets whose Content-Type is not a JavaScript or CSS type, and module scripts always need a JavaScript type. Look up the extension here and fix the type in your server configuration.

Is application/octet-stream ever right?

It means “arbitrary binary data” and makes browsers download the file instead of showing it. It is the right choice for files with no better type, and servers fall back to it for extensions they do not know.

Are my files uploaded for the check?

No. The browser reads the first and last 64 KB of each file on your device; nothing is sent anywhere, and the page works offline once loaded.

Quick answers and tool search

Type to search tools or to get a quick answer, for example 18% of 2500. Use the up and down arrow keys to move through the results, Enter to choose, and Escape to close.