MIME Type Lookup

Look up the MIME type for a file extension (and vice versa).

Open tool

Overview

Type a file extension to see its registered MIME type, or type a MIME type to see which extensions it covers. The reference includes the common types you reach for daily and the long tail of less-frequent ones documented in IANA's media type registry.

It's for developers writing file upload validators, configuring Content-Type headers, debugging why a browser is downloading a file instead of rendering it, or building a static-file server. Reach for it when wiring up the right MIME for a .webp, picking between application/json and text/json, or just confirming what type a CSV should be served as.

How it works

The reference draws from the IANA media types registry - the authoritative list of registered MIME types under type/subtype form. Extensions map to types through both the IANA registry's "associated suffix" hints and the mime-db dataset used by most server-side MIME libraries (nginx, Apache, Node's mime package).

Where multiple types are valid for a single extension (e.g. .mp4 -> video/mp4 or application/mp4), the most-common-on-the-web variant is presented first with the alternatives noted.

Examples

  • Common extensions:
    .json -> application/json
    .pdf  -> application/pdf
    .png  -> image/png
    .svg  -> image/svg+xml
    .csv  -> text/csv
    .webp -> image/webp
    
  • Reverse lookup:
    application/vnd.ms-excel -> .xls
    text/markdown            -> .md, .markdown
    
  • Modern web fonts:
    .woff2 -> font/woff2
    
  • Multimedia:
    .mp4 -> video/mp4 (preferred), application/mp4 (deprecated)
    

FAQ

Why does my browser download files instead of rendering them?

Either the server is sending Content-Disposition: attachment, or the MIME type is generic (application/octet-stream). Set the right MIME and remove the disposition header.

Should I use text/json or application/json?

Always application/json per RFC 8259. text/json is unofficial and rejected by some clients.

What about charset parameters?

For text types, append ; charset=utf-8 (e.g. text/html; charset=utf-8). For binary types like JSON, charset is implicit (UTF-8 always).

How do I sniff a MIME type from file bytes?

Use a magic-number library (file's libmagic on Unix, mime-types in Node). Extension-based lookup is fast but can be spoofed; sniffing is more robust.

Try MIME Type Lookup

An unhandled error has occurred. Reload ×