πŸ“„

MIME Type Finder

Find MIME type for file extensions instantly. Look up media types for images, videos, documents, and more.

Developer ToolsDevelopment
Loading tool...

How to Use MIME Type Finder

How to Use MIME Type Finder

MIME Type Finder is a quick and easy tool for looking up MIME types (media types) for any file extension. Whether you're configuring web servers, building applications, or writing HTTP headers, this tool provides instant access to MIME type information.

Quick Start Guide

  1. Enter Extension: Type any file extension in the search box (e.g., .png, .pdf, or just png)
  2. View Results: Instantly see the MIME type, category, and description
  3. Copy MIME Type: Click "Copy MIME Type" to copy for use in your code
  4. Explore Examples: Click example buttons to see common file types

Understanding MIME Types

What is a MIME Type?

MIME (Multipurpose Internet Mail Extensions) types are standard labels used to identify file types on the internet. They tell browsers and servers how to handle different files.

Format: type/subtype

Examples:

  • image/png - PNG image
  • application/pdf - PDF document
  • video/mp4 - MP4 video

Why MIME Types Matter:

  • Web Development: Serve files with correct Content-Type headers
  • File Uploads: Validate file types on servers
  • APIs: Specify response and request formats
  • Email: Attach files with proper MIME types
  • Browser Handling: Determine how browsers open files

Common Use Cases

1. Setting HTTP Headers

Problem: Need to serve a PNG image with correct headers

Solution:

Extension: .png
MIME Type: image/png

HTTP Header:
Content-Type: image/png

2. File Upload Validation

Problem: Validate PDF uploads in web forms

Solution:

Extension: .pdf
MIME Type: application/pdf

JavaScript validation:
if (file.type === 'application/pdf') {
  // Valid PDF
}

3. API Response Types

Problem: Return JSON data from API

Solution:

Extension: .json
MIME Type: application/json

Response Header:
Content-Type: application/json

4. Video Streaming

Problem: Stream MP4 video on website

Solution:

Extension: .mp4
MIME Type: video/mp4

HTML5 video:
<video>
  <source src="video.mp4" type="video/mp4">
</video>

5. Font Loading

Problem: Load web fonts correctly

Solution:

Extension: .woff2
MIME Type: font/woff2

CSS:
@font-face {
  src: url('font.woff2') format('woff2');
}

6. Document Downloads

Problem: Force download of Word document

Solution:

Extension: .docx
MIME Type: application/vnd.openxmlformats-officedocument.wordprocessingml.document

HTTP Header:
Content-Type: application/vnd.openxmlformats-officedocument.wordprocessingml.document
Content-Disposition: attachment; filename="document.docx"

Supported File Types

Images:

  • .jpg, .jpeg - image/jpeg
  • .png - image/png
  • .gif - image/gif
  • .webp - image/webp
  • .svg - image/svg+xml
  • .ico - image/x-icon
  • .bmp - image/bmp
  • .tiff - image/tiff
  • .avif - image/avif

Videos:

  • .mp4 - video/mp4
  • .webm - video/webm
  • .avi - video/x-msvideo
  • .mov - video/quicktime
  • .mkv - video/x-matroska
  • .mpeg - video/mpeg

Audio:

  • .mp3 - audio/mpeg
  • .wav - audio/wav
  • .ogg - audio/ogg
  • .m4a - audio/mp4
  • .flac - audio/flac
  • .aac - audio/aac

Documents:

  • .pdf - application/pdf
  • .doc - application/msword
  • .docx - application/vnd.openxmlformats-officedocument.wordprocessingml.document
  • .xls - application/vnd.ms-excel
  • .xlsx - application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
  • .ppt - application/vnd.ms-powerpoint
  • .pptx - application/vnd.openxmlformats-officedocument.presentationml.presentation
  • .txt - text/plain
  • .csv - text/csv

Web:

  • .html - text/html
  • .css - text/css
  • .js - text/javascript
  • .json - application/json
  • .xml - application/xml

Archives:

  • .zip - application/zip
  • .rar - application/vnd.rar
  • .7z - application/x-7z-compressed
  • .tar - application/x-tar
  • .gz - application/gzip

Fonts:

  • .woff - font/woff
  • .woff2 - font/woff2
  • .ttf - font/ttf
  • .otf - font/otf
  • .eot - application/vnd.ms-fontobject

Technical Details

MIME Type Structure:

type/subtype

Main Types:

  • text - Text documents (HTML, CSS, plain text)
  • image - Images (PNG, JPEG, GIF)
  • audio - Audio files (MP3, WAV)
  • video - Video files (MP4, WebM)
  • application - Application data (PDF, JSON, ZIP)
  • font - Font files (WOFF, TTF)

Common Subtypes:

  • plain - Plain text
  • html - HTML documents
  • json - JSON data
  • pdf - PDF documents
  • zip - ZIP archives
  • octet-stream - Generic binary data

Special MIME Types:

  • application/octet-stream - Generic binary, forces download
  • multipart/form-data - Form uploads with files
  • text/plain; charset=utf-8 - Text with character encoding

Best Practices

Server Configuration:

Always set correct MIME types in server responses:

Apache (.htaccess):

AddType image/webp .webp
AddType font/woff2 .woff2
AddType application/json .json

Nginx:

types {
    image/webp webp;
    font/woff2 woff2;
    application/json json;
}

Node.js/Express:

res.setHeader('Content-Type', 'image/png')

File Upload Validation:

Validate MIME types on both client and server:

HTML:

<input type="file" accept="image/png,image/jpeg">

JavaScript:

const allowedTypes = ['image/png', 'image/jpeg']
if (!allowedTypes.includes(file.type)) {
  alert('Invalid file type')
}

Security Considerations:

  • Never trust client-provided MIME types alone
  • Validate file content, not just extension
  • Use server-side validation for uploads
  • Set proper Content-Security-Policy headers

Common MIME Type Scenarios

Scenario 1: Image Gallery

You need MIME types for:

  • Thumbnails: image/webp or image/jpeg
  • High-res: image/png
  • Icons: image/svg+xml

Scenario 2: Document Management

You need MIME types for:

  • PDFs: application/pdf
  • Word docs: application/vnd.openxmlformats-officedocument.wordprocessingml.document
  • Spreadsheets: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet

Scenario 3: Media Streaming

You need MIME types for:

  • Video: video/mp4, video/webm
  • Audio: audio/mpeg, audio/ogg
  • Subtitles: text/vtt

Scenario 4: API Development

You need MIME types for:

  • JSON responses: application/json
  • XML responses: application/xml
  • Binary data: application/octet-stream

Troubleshooting

Issue: Browser not displaying file correctly

Solution: Check the Content-Type header matches the actual file type. Use browser DevTools Network tab to inspect headers.

Issue: File downloads instead of displaying

Solution: Use correct MIME type (not application/octet-stream). Example: Use image/png for PNG images, not generic binary type.

Issue: Font not loading

Solution: Ensure correct MIME type for font format. WOFF2 needs font/woff2, not application/octet-stream.

Issue: Video not playing

Solution: Check browser support for format and ensure correct MIME type. Use video/mp4 for MP4, video/webm for WebM.

Issue: File upload validation failing

Solution: Some browsers report different MIME types. Validate file extension and content, not just MIME type.

Browser Compatibility

This tool works in all modern browsers:

  • βœ… Chrome/Edge (latest)
  • βœ… Firefox (latest)
  • βœ… Safari (latest)
  • βœ… Opera (latest)

Required Features:

  • JavaScript enabled
  • Clipboard API (for copy functionality)

Privacy & Security

Client-Side Processing:

All MIME type lookups happen entirely in your browser. Your searches:

  • Never leave your device
  • Are not sent to any server
  • Are not logged or stored
  • Disappear when you close/refresh the page

Safe for Sensitive Projects:

You can safely look up MIME types for:

  • Proprietary file formats
  • Internal project files
  • Any file extensions

Advanced Use Cases

Custom File Types:

Create custom MIME types for proprietary formats:

application/vnd.company.product+json

Multi-Part Content:

Handle complex uploads:

multipart/form-data
multipart/mixed

Content Negotiation:

Support multiple formats:

Accept: application/json, application/xml

Email Attachments:

Attach files with correct MIME types:

Content-Type: application/pdf
Content-Disposition: attachment; filename="report.pdf"

MIME Type Categories

Text Files:

  • Plain text, HTML, CSS, JavaScript, CSV, XML

Images:

  • Raster (JPEG, PNG, GIF) and Vector (SVG)

Audio/Video:

  • Streaming formats, compressed/uncompressed

Documents:

  • Office files, PDFs, eBooks

Archives:

  • Compressed files and packages

Fonts:

  • Web fonts and system fonts

Applications:

  • Executables, packages, binary data

Tips & Tricks

  1. Use Examples: Click example buttons to see common file types
  2. Omit the Dot: Works with or without leading dot (.png or png)
  3. Copy Quickly: Use "Copy MIME Type" for instant clipboard copy
  4. Bookmark Tool: Quick reference for web development
  5. Check Headers: Use browser DevTools to verify MIME types
  6. Validate Uploads: Always check MIME types server-side
  7. Modern Formats: Consider newer formats like WebP and WOFF2
  8. Test Compatibility: Check browser support for MIME types

Frequently Asked Questions

Most Viewed Tools

πŸ“Ί

Screen Size Converter

710 views

Calculate screen width and height from diagonal size and aspect ratio. Convert between inches and centimeters for displays, TVs, and monitors with instant dimension calculations.

Use Tool β†’
πŸ–¨οΈ

DPI Calculator

290 views

Calculate DPI (dots per inch), image dimensions, and print sizes. Convert between pixels and physical dimensions for printing and displays.

Use Tool β†’
πŸ“„

Paper Size Converter

251 views

Convert between international paper sizes (A4, Letter, Legal) with dimensions in mm, cm, and inches. Compare ISO A/B series and North American paper standards.

Use Tool β†’
β›½

Fuel Consumption Converter

237 views

Convert between MPG (miles per gallon), L/100km (liters per 100 kilometers), and other fuel efficiency units. Compare car fuel economy across different measurement systems.

Use Tool β†’
βœ‚οΈ

CSV Splitter

226 views

Split large CSV files into smaller files by number of rows. Process large datasets in manageable chunks instantly.

Use Tool β†’
πŸ›οΈ

Product Schema Generator

206 views

Generate JSON-LD Product schema markup for SEO. Add product details like name, price, brand, rating, and availability to create structured data for rich search results.

Use Tool β†’
πŸ“„

Large Text File Viewer

175 views

View and search large text files up to 200MB in your browser. Features virtual scrolling, line numbers, search functionality, and file statistics. Perfect for log files, CSV, JSON, and code files.

Use Tool β†’
πŸ”‘

API Key Generator

162 views

Generate secure, cryptographically random API keys for authentication and authorization. Create custom API keys with various formats including hex, base64, and prefixed keys.

Use Tool β†’

Related Development Tools

Share Your Feedback

Help us improve this tool by sharing your experience

We will only use this to follow up on your feedback