MIME Type Lookup

Look up the right MIME type for any file. Type an extension like .webp or .woff2 to get its Content-Type, or a MIME type like application/json to see which extensions use it. Text types come with the charset to add, and extensions with more than one type in use show them all. It's free, runs in your browser, and nothing is sent anywhere.

Common types

ExtensionMIME type
.htmltext/html
.csstext/css
.jstext/javascript
.jsonapplication/json
.svgimage/svg+xml
.webpimage/webp
.woff2font/woff2
.pdfapplication/pdf

When to use it

  1. Set the right Content-Type for files on a CDN or S3 bucket.
  2. Fix a font or script that the browser refuses to load.
  3. Configure MIME types in Nginx, Apache or a web framework.
  4. Validate allowed upload types in a form.

How to Use

  1. Type a file extension or a MIME type.
  2. Read the matching rows.
  3. Copy the Content-Type you need.

Features

  1. About 100 common types
  2. Extension and type search
  3. Text or binary marked
  4. charset hint for text
  5. All variants for ambiguous extensions
  6. 100% client-side

FAQs

What is a MIME type?

A label like image/png that tells the browser how to handle a file. It's sent in the Content-Type header.

What MIME type should I use for JavaScript?

text/javascript — it's the current standard, replacing application/javascript.

What if a file type isn't listed?

Serve unknown binary files as application/octet-stream, which makes browsers download them.

Why add charset=utf-8?

Without it, browsers may guess the text encoding and show garbled characters.

Is anything uploaded?

No. The lookup runs in your browser.

Technical Details

A server tells a browser what a file is through the Content-Type header, using a MIME type such as image/webp or application/json; get it wrong and a script won't run, a font won't load or a download opens as text. The lookup covers about a hundred common types — web formats, modern images like AVIF, HEIC and JPEG XL, video and audio containers, web fonts, office documents, archives, 3D models and code — and searches in both directions: an extension (with or without the dot) returns its type, and a type or partial type such as video/ returns the matching extensions. Where more than one type is in real use for an extension, such as .xml as application/xml or text/xml and .ico as image/vnd.microsoft.icon or image/x-icon, all are listed with the registered IANA name first. Each type is marked text or binary, and text types are copied with ; charset=utf-8 because omitting the charset is a common cause of garbled characters.

Developer Tools

Developer Tools

  • Luhn Validator
  • IBAN, ISBN & Barcode Validator
  • SSL Certificate Decoder
  • HAR File Viewer
  • OpenAPI & Swagger Viewer
  • Log Analyzer
  • .env File Validator
  • HTTP Headers Parser