Monitoring
Solutions
Resources
Free Tools
Pricing
Free Tools / HTTP & web / MIME Type Checker

MIME Type Checker

Type an extension like .webp or a type like application/json to look it up, or choose a file to see what it really is. The first bytes of a file tell its true format, whatever its name says — handy when a server sends the wrong Content-Type.

Files are read in your browser — only their first bytes are looked at, and nothing is uploaded.

What a MIME type does

A MIME type — also called a media type or content type — is the label a server puts on a response with the Content-Type header: text/html, image/png, application/json. The browser decides what to do with the response from that label, not from the file name. Send a stylesheet as text/plain and the browser refuses to apply it; send a PDF as application/octet-stream and it downloads instead of opening.

type/subtype

The first part is the family — text, image, audio, video, font, application — the second the exact format. A +json or +xml suffix means "built on JSON or XML".

charset

Text types carry the encoding as a parameter: text/html; charset=utf-8. Leave it out and some browsers guess, which garbles non-ASCII characters.

octet-stream

application/octet-stream means "unknown bytes". It is the safe default for files the server cannot classify, and always triggers a download.

nosniff

With X-Content-Type-Options: nosniff the browser trusts the header completely. Good for security — but a wrong Content-Type then breaks scripts and styles outright.

Detecting the real type of a file

Most binary formats start with a fixed signature, sometimes called a magic number: PNG files begin with the bytes 89 50 4E 47, PDFs with %PDF, ZIP files with PK. Reading the first bytes tells you what a file really is, regardless of its name. That is how upload filters catch a script renamed to photo.jpg, and how you find out that a "broken" image is actually an HTML error page saved with an image extension.

Office documents (docx, xlsx, pptx), EPUB and Android packages are all ZIP archives inside; the checker looks into the first entries to tell them apart. Text formats like JSON, SVG, CSV and HTML have no signature, so they are recognised by their opening characters.

When an API or asset suddenly breaks in the browser, check the Content-Type the server sends as well — an HTTP monitor can alert you when it changes.

Frequently asked questions

What is the MIME type for JSON?

application/json. Since 2006 it has been the only registered type for JSON; text/json and text/javascript are outdated and should not be used for API responses.

What MIME type should JavaScript files have?

text/javascript. The HTML standard settled on it; application/javascript still works in every browser but is listed as obsolete. Modules (.mjs) use the same type.

Why does my browser download a file instead of showing it?

The server sends it as application/octet-stream or another type the browser cannot display, or adds Content-Disposition: attachment. Configure the server to send the correct type for that extension.

Can a file's extension lie about its type?

Yes — the extension is just part of the name. The signature bytes at the start of the file show the real format, which is why upload validation should check the content and not only the name.

Related free tools

A calculator answers once. Monitoring answers every minute.

Upzilla checks your sites, servers and APIs around the clock and alerts you the moment something breaks. 10 monitors free, no card required.

Start monitoring free →