MIME Type Reference

Comprehensive reference table for MIME types (Content-Types) and file extensions.

Back to all tools on ToolForge

More in Developer Tools

About MIME Type Reference

This reference lists MIME types used in HTTP Content-Type headers, file uploads, email attachments, and web APIs. MIME types follow the format type/subtype where type is the general category (text, image, application) and subtype specifies the exact format.

Correct MIME types ensure browsers render content properly, downloads work correctly, and APIs parse data as expected.

MIME Type Structure

Format: type/subtype[; parameters]

Types:
  application  - Binary data, application-specific formats
  audio        - Audio files and streams
  font         - Font files (WOFF, TTF, OTF)
  image        - Image files (PNG, JPEG, GIF, SVG)
  message      - Email messages, MIME parts
  model        - 3D models, CAD files
  multipart    - Multiple parts (form-data, signed messages)
  text         - Text files (HTML, CSS, JavaScript, plain text)
  video        - Video files and streams

Parameters:
  charset=utf-8  - Character encoding for text types
  boundary=...   - Boundary for multipart types

Setting Content-Type in Different Contexts

// HTTP Response Header
Content-Type: text/html; charset=utf-8

// Apache (.htaccess)
AddType application/json .json
AddType image/webp .webp

// Nginx (nginx.conf)
types {
    application/json  json;
    image/webp        webp;
}

// Node.js Express
res.setHeader('Content-Type', 'application/json');
res.json({ key: 'value' });

// PHP
header('Content-Type: application/json');
echo json_encode($data);

// Python Flask
return jsonify({'key': 'value'})  # Auto-sets application/json

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

// JavaScript fetch
fetch('/api', {
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify(data)
});

MIME Types by Category

Text Formats
MIME TypeExtensionsDescription
text/html.html, .htmHTML document
text/css.cssCSS stylesheet
text/javascript.js, .mjsJavaScript file
text/plain.txt, .textPlain text
text/xml.xmlXML document
text/csv.csvComma-separated values
text/markdown.md, .markdownMarkdown document
text/yaml.yaml, .ymlYAML data
text/rtf.rtfRich Text Format
Application/Data Formats
MIME TypeExtensionsDescription
application/json.jsonJSON data
application/xml.xmlXML document
application/pdf.pdfPDF document
application/msword.docMicrosoft Word
application/vnd.openxmlformats-officedocument.wordprocessingml.document.docxWord 2007+
application/vnd.ms-excel.xlsMicrosoft Excel
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.xlsxExcel 2007+
application/vnd.ms-powerpoint.pptPowerPoint
application/vnd.openxmlformats-officedocument.presentationml.presentation.pptxPowerPoint 2007+
application/rtf.rtfRich Text Format
application/x-www-form-urlencodedForm submission
application/graphqlGraphQL query
Image Formats
MIME TypeExtensionsDescription
image/jpeg.jpg, .jpegJPEG image
image/png.pngPNG image
image/gif.gifGIF image
image/webp.webpWebP image
image/svg+xml.svgSVG vector image
image/x-icon.icoFavicon
image/bmp.bmpBitmap image
image/tiff.tif, .tiffTIFF image
image/avif.avifAV1 image format
image/heic.heicHEIF image (Apple)
Audio Formats
MIME TypeExtensionsDescription
audio/mpeg.mp3MP3 audio
audio/wav.wavWAV audio
audio/ogg.oggOgg Vorbis
audio/webm.webmWebM audio
audio/mp4.m4a, .aacAAC/M4A audio
audio/flac.flacFLAC lossless
audio/midi.mid, .midiMIDI file
Video Formats
MIME TypeExtensionsDescription
video/mp4.mp4, .m4vMP4 video
video/webm.webmWebM video
video/ogg.ogvOgg video
video/quicktime.movQuickTime
video/x-msvideo.aviAVI video
video/x-matroska.mkvMatroska
video/mpeg.mpeg, .mpgMPEG video
Archive/Compressed Formats
MIME TypeExtensionsDescription
application/zip.zipZIP archive
application/gzip.gz, .gzipGzip compressed
application/x-tar.tarTAR archive
application/x-rar-compressed.rarRAR archive
application/x-7z-compressed.7z7-Zip archive
application/x-bzip2.bz2Bzip2 compressed
application/x-xz.xzXZ compressed
Font Formats
MIME TypeExtensionsDescription
font/woff.woffWOFF font
font/woff2.woff2WOFF2 font
font/ttf.ttfTrueType font
font/otf.otfOpenType font
application/font-sfnt.ttf, .otfSFNT fonts (legacy)
Multipart/Binary
MIME TypeExtensionsDescription
multipart/form-dataFile upload form
multipart/mixedMixed content parts
application/octet-stream.bin, .dataGeneric binary
application/x-executable.exeExecutable binary

Frequently Asked Questions

What is a MIME type?
MIME (Multipurpose Internet Mail Extensions) type is a standardized identifier that tells browsers and servers what type of file is being transmitted. Format: type/subtype (e.g., text/html, image/png). MIME types are used in Content-Type headers, file uploads, and API responses.
Why are MIME types important?
MIME types ensure correct file handling: browsers render HTML/CSS properly, plugins handle specific formats, downloads get correct extensions, and APIs parse request/response bodies. Wrong MIME types cause security issues, broken downloads, and rendering problems.
What is the Content-Type header?
Content-Type is an HTTP header that specifies the MIME type of a resource. Example: 'Content-Type: text/html; charset=utf-8'. Servers send this with responses; clients send it with POST/PUT requests containing body data (forms, JSON, file uploads).
What is application/octet-stream?
application/octet-stream is the generic MIME type for binary data. Used when the specific type is unknown or when forcing file downloads. Browsers typically download (not display) octet-stream files. Prefer specific MIME types when known.
How do I add MIME types to my server?
Apache: Add 'AddType' directives to .htaccess or httpd.conf. Nginx: Use 'types' block in nginx.conf. IIS: Configure via IIS Manager or web.config. Node.js/Express: Use mime-types package. Most modern frameworks handle common types automatically.
What MIME type for JSON?
application/json is the standard MIME type for JSON. Also acceptable: text/json (less common). When sending JSON APIs, use: Content-Type: application/json; charset=utf-8. JavaScript files use text/javascript (application/javascript is deprecated).