BYTETOOLS

Real-World Use Cases for a MIME Type Lookup

A MIME type lookup earns its keep whenever you need to configure a server, validate file uploads, fix a file that downloads instead of previewing, or set the right Content-Type on an API response. In each case you have an extension and need the exact media type — or a media type and need the extension — and guessing risks subtle bugs. Here are the everyday scenarios where developers reach for it.

Scenario 1: A PDF downloads instead of opening

A user reports that clicking a report link forces a download rather than showing the PDF in the browser. You open the network panel and see the server sent application/octet-stream. Looking up pdf confirms the correct type is application/pdf; you update the server's MIME map, and the report previews inline as expected. This same fix applies to images, SVGs and any file a browser can render natively.

Scenario 2: Configuring a static file server

You are deploying a site with WebP images, WOFF2 fonts and a JSON manifest. The default server config doesn't know some of these, so it falls back to octet-stream and the assets fail. You look up each extension and add the mappings:

AssetExtensionContent-Type to serve
Hero image.webpimage/webp
Web font.woff2font/woff2
PWA manifest.webmanifestapplication/manifest+json
Vector icon.svgimage/svg+xml

With each type set correctly, images load, fonts render and the manifest is recognised.

Scenario 3: Validating file uploads

Your app accepts image uploads only. A response comes back with image/jpeg and you want to confirm which extensions legitimately map to it before writing your allow-list. The lookup shows both .jpg and .jpeg share image/jpeg, so you include both. You build a small allow-list of accepted content types and reject anything that doesn't match, keeping unwanted formats out.

Scenario 4: Building an API response by hand

You are writing an endpoint that streams a generated CSV. You need the header value but can't recall it offhand. Searching csv returns text/csv, which you drop straight into res.setHeader('Content-Type', 'text/csv'). For a JSON-LD endpoint you search json and pick application/ld+json for structured data. No memorising, no typos.

Scenario 5: Reverse lookup from a response header

You are reading an API's raw response and see an unfamiliar content type. Typing part of it — say application/ — filters the table to every matching format so you can identify which extension and file kind it represents. This reverse direction is handy when debugging third-party services whose payloads you didn't build.

Try the MIME Type Lookup — free and 100% in your browser.

FAQ

Which MIME type should I serve for a CSV export?

Use text/csv so spreadsheet software recognises the download. If you need the browser to save rather than open it, keep text/csv and add a Content-Disposition: attachment header with the file name.

How do I decide the accepted types for an upload form?

Look up each format you intend to allow, note its canonical content type, and build a server-side allow-list from those values. Validate the real type on the server rather than trusting the file name alone.

What content type does a PWA manifest use?

A web app manifest is typically served as application/manifest+json. Serving it correctly helps browsers treat your site as installable.

Can I use the lookup to identify an unknown response type?

Yes. Paste part of the content type you saw into the search box and the table filters to every matching format, so you can map an unfamiliar header back to a known file kind and extension.

Related free tools

Built by ByteVancer

ByteTools is a free product of ByteVancer, a software and web development studio that builds web apps, SaaS and custom software. When your project needs more than a quick tool, explore how ByteVancer can deliver the full build.