J-Kit
Português

mime type by file extension

MIME type by file extension

Setting the correct Content-Type is essential for browsers, CDNs and APIs to handle files correctly. A wrong MIME type can make the browser download a file instead of displaying it, or cause failures loading WebAssembly and web fonts.

Most important MIME types for web

  • The most critical MIME types: text/html (HTML), text/css, text/javascript (JS), application/json, image/svg+xml, application/wasm (WebAssembly), font/woff2 (fonts). Getting any of these wrong can cause severe page loading failures.

Common extensions and their MIME types

PDF

Input
.pdf
Expected output
application/pdf

Modern browsers display PDFs inline by default when Content-Type is correct.

WebAssembly

Input
.wasm
Expected output
application/wasm

Critical: serving as application/octet-stream may cause failures in Wasm module fetch().

Full tool FAQ

A MIME type (or media type) is a two-part identifier — type/subtype — that tells the receiver what format a piece of data is in. Originally created for email (Multipurpose Internet Mail Extensions, RFC 2045), it is now ubiquitous in HTTP, where the Content-Type header defines how the browser interprets content.

Frequently asked questions

What happens if I use the wrong MIME type?

It depends on the type. For CSS: the browser may ignore the stylesheet. For JS: some environments refuse to execute it. For WebAssembly: module failure. For images: the browser may display as text. Always use the official IANA type to ensure predictable behaviour.

Does this page replace official or professional review?

No. It helps explain the scenario and use the tool more safely, but real decisions should consider official sources, full context and qualified guidance when needed.