⌨ DEVELOPER · REFERENCE

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.

2,522 types · 1,239 extensions · Same answers as Node's mime-types · File checker
Tip: type a full file name — the last extension decides (backup.tar.gz → .gz).Looking up a server response instead? HTTP Status Code Lookup →
MIME typeExtensionsSource
Check real filesCompare a file's extension with what its content actually is. Only the first 4 KB of each file are read, on this device.
Drop files here
Showing: 0
Types: 2,522
Extensions: 1,239
mime-db 1.54.0 (MIT) · Node mime-types 3.0.2
◆ ABOUT THIS TOOL

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.

⌘ REFERENCE

Common Types for the Web

The ones you'll configure most often.

ExtensionContent-TypeExtensionContent-Type
.htmltext/html; charset=utf-8.pngimage/png
.csstext/css.jpgimage/jpeg
.js / .mjstext/javascript.webpimage/webp
.jsonapplication/json.avifimage/avif
.svgimage/svg+xml.mp4video/mp4
.woff2font/woff2.mp3audio/mpeg
.wasmapplication/wasm.pdfapplication/pdf
.xmlapplication/xml.zipapplication/zip
.txttext/plain; charset=utf-8unknownapplication/octet-stream
◐ THREE STEPS

How to Use the MIME Type Lookup

Get your result in under ten seconds.

1

Search

An extension, a file name, a type or a word like “font”.

2

Copy the type

Or the ready-made line for nginx, Apache, IIS or an HTML accept attribute.

3

Check files

Drop files to see whether their content matches their extension.

✓ FEATURES

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.

FAQ

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.