MIME type lookup — map file extensions to Content-Type for APIs, uploads, and HTTP headers

Use this free MIME type lookup tool to resolve file extensions to common Content-Type values, or paste a media type to see typical extensions. It helps when you configure multipart uploads, document REST APIs, set fetch headers, and align with OpenAPI content types. Copy results with the copy icon; use Upload file with the upload icon to compare the browser's File.type with the catalog. Everything runs in your browser—no server round trip for lookups. For raw HTTP testing, pair this with the HTTP request builder and HTTP status code reference.

Enter a path or basename (slashes are OK), a lone extension like png or .wasm, or a full MIME type to list matching extensions. Use Upload file to compare the browser's file.type with the table lookup.

Extension → MIME

Extension
.pdf
Primary MIME
application/pdf

What is MIME type lookup and why do developers need it?

MIME types (also called media types) label bytes: application/json for JSON APIs, text/csv for spreadsheets, image/webp for modern images, and hundreds of others registered with IANA or de facto in frameworks. Teams search for MIME type by extension when they set Content-Type headers, validate uploads, or write OpenAPI content blocks. Reverse lookup—finding extensions for a Content-Type string—helps when you inherit a header without sample filenames.

Keywords that match this page include extension to MIME, Content-Type lookup, media type finder, API upload MIME, and multipart form data type. The catalog focuses on formats common in web, mobile, and API development—not every experimental vendor type is listed.

How to use this MIME type lookup (step by step)

  1. Enter a filename or path (for example dist/bundle.js), a bare extension like wasm or .yaml, or a full MIME type for reverse lookup. Compound suffixes such as .tar.gz are recognized before the final segment alone.
  2. Click the copy icon next to the primary MIME type or extension list to paste into headers, tickets, or OpenAPI YAML. Use Copy list when multiple extensions share one type.
  3. Optional: use Upload file to load a local file name into the field and read File.type from the browser. Compare it with the catalog when debugging mismatches between client and server.
  4. When you need to inspect or format API payloads after choosing types, use the API response formatter or JSON formatter. For OpenAPI specs, open the OpenAPI / Swagger viewer.

Content-Type headers, uploads, and API contracts

HTTP uses Content-Type to describe request and response bodies. For multipart/form-data, each part can carry its own type. CDNs and object stores often infer or override types from extensions or magic bytes—your lookup here is a starting point, not a replacement for server configuration. For rate limits and quotas after you ship the API, see the API rate limit calculator.

Privacy

Lookup runs in your browser. The upload button reads metadata (name, size, reported type) only; file contents are not sent to our servers for this page.

Related API developer toolbox tools

Browse the full API developer toolbox section on the home page. Highlights:

  • HTTP Request BuilderTest, document, and debug APIs without leaving the browser—pick method, headers, and body, then send with fetch.
  • API Response FormatterPaste any JSON or XML API response: pretty-print, validate, and explore a collapsible tree view.
  • OpenAPI / Swagger ViewerPaste OpenAPI in YAML or JSON and browse interactive docs—paths, schemas, and examples in one place.
  • Webhook Payload TesterPractice webhook debugging client-side: log sample POST bodies locally (e.g. localStorage) when a public capture URL is not available.
  • HTTP Status Code ReferenceSearch HTTP status codes with plain-English meanings, typical causes, and what to do next.
  • OAuth 2.0 Flow VisualizerWalk through the authorization code flow step by step with interactive fields and diagrams.
  • API Rate Limit CalculatorGiven X requests per minute and a daily budget of Y calls, see pacing and when you hit the wall.

Frequently asked questions

What is a MIME type and why do APIs use Content-Type?
A MIME type (also called media type) is a label like application/json or image/png that tells clients and servers what format bytes are in. HTTP uses the Content-Type header so browsers, CDNs, and API gateways can parse bodies correctly, pick parsers, and apply security rules. Upload forms and multipart boundaries also rely on MIME types for each part.
Is MIME type determined only by the file extension?
No. The extension is a hint—this tool maps common extensions to typical Content-Type values. The operating system, browser, or server may sniff bytes (magic numbers) or use a different registry. Always align with your API contract or framework defaults when they differ from a generic table.
Why might my browser report a different type than this lookup?
The File API exposes file.type, which is the browser’s guess and can be empty for uncommon extensions. Our table follows widely used mappings for web and API work; your OS clipboard or server nginx mime.types may list another acceptable alias (for example text/javascript versus application/javascript for .js).
What MIME type should I use for .ts files?
It depends on the bytes: MPEG transport streams often use the .ts extension with video/mp2t. TypeScript source files are frequently served or uploaded with text/typescript in tooling, though conventions vary. If you are packaging video, use video/mp2t; for source code, follow your bundler or API documentation.
Can I paste a MIME type to see file extensions?
Yes. Enter a type such as application/json or image/svg+xml (parameters like charset are ignored for matching) and the tool lists extensions that map to that type in our catalog. The list is not exhaustive—IANA registers many aliases.
Does this tool upload my files to a server?
No. File metadata and extension lookup run entirely in your browser. Upload uses the File API locally so you can compare the browser-reported type with the extension-based mapping—nothing is sent to our servers for MIME resolution.
How does this relate to OpenAPI or REST documentation?
OpenAPI schemas often declare content types per request and response. Use this lookup to double-check extensions against types when you document multipart/form-data or binary payloads, then refine in our OpenAPI viewer or HTTP request builder tools when you test endpoints.