Developer

MIME Type Lookup

Find MIME types from extensions and reverse-map MIME to extensions.

Loading interactive tool…

Embed this tool on your site

About this tool

MIME Type Lookup provides two-way lookups between file extensions and MIME content-type strings for 48 common file types across text, web, archive, image, audio, video, font and Office formats. Choose Extension → MIME and enter an extension like .mp4 or .wasm to get its MIME type, or choose MIME → Extension(s) and enter a type like image/jpeg to list the extensions that map to it. Input is case-insensitive and a leading dot is optional. The result is a single line such as mp4 -> video/mp4. This is handy for configuring server Content-Type response headers, writing upload accept attributes, and checking API file handling logic. Types outside the built-in table are reported as not found, so check the IANA registry for rarer formats. All lookups run locally in the browser — no file content is ever analyzed or uploaded.

Why use it

  • Instant header values: Stop guessing Content-Type strings for formats like .wasm, .avif, or .heic — look them up in seconds and paste the correct value into your server config.

  • Two-way lookup: Look up a MIME type from an extension or the extensions for a MIME type — switch with the Lookup Direction menu.

  • Forgiving input: Extensions work with or without a leading dot and in any letter case, so .JPG, jpg and .jpg all give the same answer.

  • Upload accept attribute helper: Building a file upload input? Look up the correct MIME type to use in the HTML accept attribute for browser-side file type filtering.

  • Office format strings in one place: The long vendor types for .docx, .xlsx and .pptx are easy to mistype — copy them from the result instead.

  • Runs locally: The extension table is built into the page, so lookups are instant and nothing you type is sent to a server.

How to use

  1. Choose the Lookup Direction — Extension → MIME or MIME → Extension(s).
  2. Type the file extension (with or without a leading dot, e.g. jpg or .jpg) or the full MIME string (e.g. image/jpeg) into the Search field.
  3. Press Enter or click Lookup to retrieve the result.
  4. Read the Result line, for example jpg -> image/jpeg or image/jpeg -> .jpeg, .jpg.
  5. If you see 'No MIME type found' or 'No common extension found', the type is not in the built-in table of 48 extensions.
  6. Select and copy the MIME string into your server config, code, or documentation; click Clear to start a new lookup.

When it helps

  • Configuring a web server (Nginx, Apache, Caddy) and needing the correct MIME type string for a file extension to add to the mime.types file or config block.
  • Writing an Express or FastAPI file-download endpoint and needing the exact Content-Type and Content-Disposition header values for a given file format.
  • Building an HTML file upload form and needing the accept attribute values (e.g. image/webp,image/avif) for the file types you want to allow.
  • Debugging a CDN or browser caching issue where assets are being served with the wrong Content-Type, causing incorrect rendering or CORS failures.
  • Validating file-type restrictions in a backend API that must reject uploads unless the server-detected MIME matches an allowlist.
  • Setting correct MIME types in an S3 bucket or Azure Blob Storage object metadata to ensure files are served correctly when accessed via direct URL.

Examples

Extension to MIME

Input
Extension → MIME: .webp
Expected result
webp -> image/webp

Reverse MIME to extension

Input
MIME → Extension(s): application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
Expected result
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet -> .xlsx

MIME with several extensions

Input
MIME → Extension(s): image/jpeg
Expected result
image/jpeg -> .jpeg, .jpg

Tips

  • Always set an explicit Content-Type on API responses — never rely on Express or Flask auto-detection for file downloads, as it can default to application/octet-stream and break browser rendering.
  • For the HTML file input accept attribute, combine MIME types and extensions for best cross-browser coverage: accept='image/png,image/jpeg,.png,.jpg' rather than relying on MIME types alone.
  • When serving user-uploaded files, re-validate the MIME type server-side using magic-byte detection — do not trust the client-supplied Content-Type header.
  • For SVG files, use image/svg+xml rather than text/xml or application/xml. Browsers require the image/ MIME type to render SVGs inline in <img> tags.
  • text/csv should always be served with charset=utf-8 appended (Content-Type: text/csv; charset=utf-8) to prevent Excel from mis-detecting encoding on Windows.

Frequently Asked Questions

What is the difference between application/octet-stream and a specific MIME type?
application/octet-stream is the generic binary fallback — browsers treat it as an unknown download and will not attempt to render it. A specific MIME type like application/pdf tells the browser (and downstream tools) the exact format, enabling inline rendering, syntax highlighting, or type-specific handling.
Can I include the leading dot when entering an extension?
Yes. The tool normalizes input, so .jpg, jpg, .JPG, and JPG all resolve to the same result. Case is ignored.
Why does one MIME type map to multiple extensions?
Some formats are standardized under a single MIME type but have more than one common extension. In this tool's table, image/jpeg maps to .jpeg and .jpg, text/javascript to .js and .mjs, and application/yaml to .yaml and .yml. The reverse lookup lists every extension in the table for that type.
Does the tool detect MIME type from actual file content (magic bytes)?
No — this is a map-based lookup only. For magic-byte detection (sniffing), you need a server-side library like file-type (Node.js) or python-magic. Extension-based lookup is still the correct approach for generating Content-Type headers on known file types.
What MIME type should I use for JSON API responses?
Use application/json for standard REST APIs. For JSON-LD (linked data), use application/ld+json. For JSON:API compliant responses, the correct type is application/vnd.api+json.
What is the correct MIME type for WebAssembly?
The IANA-registered MIME type for WebAssembly is application/wasm. Some older server configs default to application/octet-stream for .wasm files, which still works but prevents some browser optimizations. Update your server config to serve .wasm with application/wasm.
Which file types are included?
A built-in table of 48 common extensions: text and web files (txt, html, css, js, mjs, json, xml, csv, md, yml/yaml), archives (zip, gz, rar, 7z), images (png, jpg/jpeg, gif, webp, avif, svg, ico, bmp, tiff, heic), audio (mp3, wav, ogg, m4a), video (mp4, webm, mov, avi, mkv), fonts (woff, woff2, ttf, otf, eot), wasm, pdf, and Microsoft Office formats. It is not the full IANA registry; unknown inputs show 'No MIME type found'.
Does it cover font MIME types for web fonts?
Yes for the common ones: .woff → font/woff, .woff2 → font/woff2, .ttf → font/ttf, .otf → font/otf and .eot → application/vnd.ms-fontobject. Legacy aliases such as application/font-woff are not listed.

Explore the category

Glossary

MIME type
Multipurpose Internet Mail Extensions type — a two-part identifier (type/subtype, e.g. image/png) that describes the format of a file or data stream. Used in HTTP Content-Type headers, HTML accept attributes, and email attachments.
Content-Type header
An HTTP response header that tells the recipient what media type the response body contains. The browser uses it to decide whether to render, download, or pass the content to a plugin.
IANA media type registry
The Internet Assigned Numbers Authority's official catalog of registered MIME types. It is the authoritative source for standardized type/subtype strings and their associated file extensions.
Magic bytes
The first few bytes of a file that identify its format independently of the file extension. Libraries like libmagic use magic bytes for reliable format detection, unlike extension-based MIME lookup.
Vendor MIME type (vnd.*)
A MIME subtype prefixed with vnd. indicating a vendor-specific format registered with IANA — for example application/vnd.ms-excel for .xls files or application/vnd.api+json for JSON:API responses.
accept attribute
An HTML input attribute (used with type='file') that restricts the file picker to specific MIME types or extensions. It is client-side only and must be paired with server-side validation.
A LITTLE HELP. A LOT DONE.
Good tools.
Great flow.

Your shortcut to the everyday. Create, convert, calculate,
and get back to what you love.

✓ Free to use✓ No sign-up✓ 500+ possibilities