How to look things up
Type one query per line. Look up (auto) works out what you typed:
- An extension, with or without the dot:
.webp,PNG,woff2. - A MIME type:
application/json. Parameters such as; charset=utf-8are ignored, andimage/*lists every image type that has extensions. - A filename, path or URL:
report.final.PDF,/var/www/app.min.js?v=3. Only the last extension counts. - A keyword:
font,+json,excel. Product names map to their real types, soexcelfinds.xlsx, whose type contains “spreadsheetml” rather than “excel”.
The default sample, .webp, returns:
image/webp
Extensions .webp
Source IANA
Charset —
Compressible unknown
Header Content-Type: image/webp
Here Source says where the mapping comes from: IANA, Apache mime.types, nginx mime.types, or “not registered” for common but unofficial types. Header shows the exact Content-Type line to send. It adds a charset parameter only for text/* types, where it has a meaning.
Shared extensions
When several types claim an extension, all of them are listed with the default first:
text/javascript (default for .js)
Extensions .js .mjs
Source IANA
Charset UTF-8
Compressible yes (gzip/brotli helps)
Header Content-Type: text/javascript; charset=utf-8
application/javascript (also used for .js)
Extensions .js
Source Apache mime.types
The default is chosen in this order:
- A standard-tree name beats a
vnd.name, which beats anx-name. - IANA beats Apache, which beats unlisted types, which beat nginx.
- video/audio beats application, which beats text, so
.mp4maps tovideo/mp4and.xmltoapplication/xml. application/octet-streamis used only when nothing else claims the extension. That is why.exemaps toapplication/x-msdownload.
Filenames → type
Switch Mode to Filenames → type to resolve a list in one go, for example the output of ls or a build manifest:
index.html text/html
styles/app.min.css text/css
assets/logo.svg image/svg+xml
backup-2026-09.tar.gz application/gzip
report.final.PDF application/pdf
README (unknown — application/octet-stream)
The status bar shows how many names were recognized, and a warning lists how many were not.
Common problems this explains
- “Failed to load module script… MIME type of text/plain”. The server has no mapping for
.mjsor.js. Addtext/javascriptto its config. - SVG downloads instead of displaying. It is being served as
application/octet-stream. Sendimage/svg+xml. - A web font fails with a CORS or type warning. Send
font/woff2and the right CORS header. - 415 Unsupported Media Type from an API. The request lacks
Content-Type: application/json. See HTTP status codes for what the API is telling you, and use cURL to code to check the headers your client sends.
For uploaded files, never trust the extension alone. Check the file’s leading bytes on the server too. To fix permissions on files you deploy, use the chmod calculator.
Frequently asked questions
What is the MIME type for .js files: text/javascript or application/javascript?
text/javascript. RFC 9239 (2022) made it the one official type and marked application/javascript obsolete. Browsers accept both for scripts, but module scripts are checked strictly, so a server that sends text/plain or application/octet-stream for a .mjs file gets the import blocked. Look up js to see both entries.
Which type should I use for an unknown file?
application/octet-stream, which means "arbitrary bytes". Browsers download such files instead of trying to display them. For text you know is plain, text/plain; charset=utf-8 is the better fallback.
What does "compressible" mean?
It's mime-db's hint on whether gzip or Brotli is worth applying. Text formats like HTML, CSS, JSON and SVG compress well. Formats that are already compressed, such as gzip, JPEG and MP4, don't, so recompressing them only costs CPU. "unknown" means mime-db has no flag for that type, and the compression middleware for Express skips such types by default.
Why does one extension have several types?
Different registries disagree, or a format was renamed. .mp4 is both video/mp4 and application/mp4 (MP4 files without video), and .xml is both application/xml and text/xml. The tool lists all of them and marks the one a server should send as the default. It prefers IANA-registered, standard-tree names over vnd. and x- names.
Where does the data come from?
From mime-db, the database behind the mime-types package used by Express and many other Node.js servers. It merges the IANA media type registry with the mime.types files shipped by Apache and nginx. The lookup runs offline in your browser.
Last updated