MIME Type Lookup
Type an extension (webp), a file name (report.final.pdf) or a type (image/*) to get the correct Content-Type, plus the lines to paste into nginx, Apache or IIS. Drop real files to check that their content matches their extension.
backup.tar.gz → .gz).Looking up a server response instead? HTTP Status Code Lookup →| MIME type | Extensions | Source |
|---|
| File | By extension | Detected from content | Browser says |
|---|
What Is a MIME Type?
The label that tells software what kind of data it's looking at.
A MIME type (also called a media type or content type) is a two-part label such as image/png or text/html: a top-level type (image, text, application, audio, video, font, model…) and a subtype. Servers send it in the Content-Type header, and browsers use it — not the file extension — to decide how to handle a response.
A wrong type causes real bugs: stylesheets that are ignored, ES modules that won't run, WebAssembly that fails to stream, downloads that open as gibberish, or files that display when they should download. This lookup uses mime-db, the database behind Node's mime-types, Express and many other tools, so its answers match what those servers send.
One extension, several types. Some extensions have more than one type in use: .wav (audio/wav, audio/wave, audio/x-wav) or .ico. The lookup shows the type Node's mime-types 3 picks (IANA-registered types win, then standard names over vnd. and x- names), lists the alternatives, and notes where the older mime-types 2 differs.
Checking files. Extensions can lie. The file checker reads the first 4 KB of each file and compares the extension with the file's magic number (its signature bytes), following the WHATWG MIME Sniffing standard: a PNG renamed to .jpg or an EXE renamed to .pdf is flagged. Nothing is uploaded.
Common Types for the Web
The ones you'll configure most often.
| Extension | Content-Type | Extension | Content-Type |
|---|---|---|---|
| .html | text/html; charset=utf-8 | .png | image/png |
| .css | text/css | .jpg | image/jpeg |
| .js / .mjs | text/javascript | .webp | image/webp |
| .json | application/json | .avif | image/avif |
| .svg | image/svg+xml | .mp4 | video/mp4 |
| .woff2 | font/woff2 | .mp3 | audio/mpeg |
| .wasm | application/wasm | application/pdf | |
| .xml | application/xml | .zip | application/zip |
| .txt | text/plain; charset=utf-8 | unknown | application/octet-stream |
How to Use the MIME Type Lookup
Get your result in under ten seconds.
Search
An extension, a file name, a type or a word like “font”.
Copy the type
Or the ready-made line for nginx, Apache, IIS or an HTML accept attribute.
Check files
Drop files to see whether their content matches their extension.
Why Use the MIME Type Lookup on Developers Web Tools
Fast, accurate and private — built for developers.
Matches Node
Same answers as mime-types 3 (Express 5), with mime-types 2 differences noted.
Both directions
Extension → type and type → extensions, including wildcards like image/*.
Conflicts explained
Every alternative type for an extension, with its source (IANA, Apache, nginx).
Config lines
Copy-ready lines for Content-Type, nginx, Apache .htaccess, IIS and HTML accept.
Real file check
Magic-number detection catches renamed or disguised files.
Private
Files are read on your device — only the first 4 KB, never uploaded.
Frequently Asked Questions
application/octet-stream means “arbitrary binary data”: browsers download it instead of displaying it. For plain text you want to display, use text/plain; charset=utf-8.
text/javascript. RFC 9239 (2022) made it the recommended type and marked application/javascript obsolete. Both work in every browser, but new configurations should use text/javascript.
Because .ts is registered as an MPEG transport stream (video/mp2t), used for HLS video. TypeScript has no official type. If you serve TypeScript source, configure text/plain; charset=utf-8 for it.
No. The browser's File.type comes from the file extension (and the operating system), not from the content. Check the content's signature on the server too. The file checker here shows both, so you can see the difference.
From mime-db 1.54.0 (MIT licence), which combines the IANA media-type registry with the type lists of Apache httpd and nginx. Node's mime-types, Express, and many other tools use it.
They pick the Content-Type from the file extension using their own list (mime.types). Newer formats such as .avif, .webmanifest or .mjs may be missing in older installs, so you add a line for them.
No. Only the first 4 KB of each file is read, in your browser, to look at its signature bytes. Nothing leaves your device.