Skip to content

MIME Types Reference

A reference of MIME (media) types for file formats. Useful for web server configuration, Content-Type headers, and upload validation.

What is a MIME type?

MIME (Multipurpose Internet Mail Extensions) types are a standard mechanism for identifying file format and nature. Written as type/subtype, they tell browsers and servers how to process a file. Used in HTTP Content-Type headers, HTML <input type="file" accept="..."> attributes, and elsewhere.

Image (image/*)

ExtensionMIME typeDescription
.jpg / .jpegimage/jpegJPEG — lossy compression, ideal for photos
.pngimage/pngPNG — lossless with alpha transparency
.gifimage/gifGIF — animation support, 256 colors
.webpimage/webpWebP — Google's high-compression format
.avifimage/avifAVIF — next-gen format based on AV1
.svgimage/svg+xmlSVG vector graphics, XML-based
.icoimage/x-iconIcon file, used for favicons
.bmpimage/bmpBitmap, uncompressed
.tiff / .tifimage/tiffTIFF, common in print/DTP

Documents (application/*)

ExtensionMIME typeDescription
.pdfapplication/pdfPDF document
.docapplication/mswordMicrosoft Word (legacy)
.docxapplication/vnd.openxmlformats-officedocument.wordprocessingml.documentMicrosoft Word (OOXML)
.xlsapplication/vnd.ms-excelMicrosoft Excel (legacy)
.xlsxapplication/vnd.openxmlformats-officedocument.spreadsheetml.sheetMicrosoft Excel (OOXML)
.pptapplication/vnd.ms-powerpointMicrosoft PowerPoint (legacy)
.pptxapplication/vnd.openxmlformats-officedocument.presentationml.presentationMicrosoft PowerPoint (OOXML)

Text (text/*)

ExtensionMIME typeDescription
.txttext/plainPlain text
.html / .htmtext/htmlHTML document
.csstext/cssCSS stylesheet
.csvtext/csvComma-separated values
.xmltext/xmlXML document
.jstext/javascriptJavaScript (application/javascript also valid)
.jsonapplication/jsonJSON data
.mdtext/markdownMarkdown text

Audio (audio/*)

ExtensionMIME typeDescription
.mp3audio/mpegMP3 — most common audio format
.wavaudio/wavWAV — uncompressed PCM
.oggaudio/oggOgg Vorbis
.flacaudio/flacFLAC — lossless compression
.aacaudio/aacAAC — successor to MP3
.webmaudio/webmWebM audio
.m4aaudio/mp4MPEG-4 audio

Video (video/*)

ExtensionMIME typeDescription
.mp4video/mp4MP4 — most common video format
.webmvideo/webmWebM — open format for the web
.avivideo/x-msvideoAVI
.movvideo/quicktimeQuickTime
.mkvvideo/x-matroskaMatroska container
.mpegvideo/mpegMPEG video

Archives & Compression (application/*)

ExtensionMIME typeDescription
.zipapplication/zipZIP archive
.gz / .gzipapplication/gzipGzip-compressed file
.tarapplication/x-tartar archive
.tar.gzapplication/gziptar+gzip archive
.rarapplication/vnd.rarRAR archive
.7zapplication/x-7z-compressed7-Zip archive
.bz2application/x-bzip2Bzip2 file

Fonts (font/*)

ExtensionMIME typeDescription
.wofffont/woffWeb Open Font Format
.woff2font/woff2WOFF2 — better compression
.ttffont/ttfTrueType font
.otffont/otfOpenType font

Other

ExtensionMIME typeDescription
(unknown)application/octet-streamGeneric binary data; default for unknown formats
.wasmapplication/wasmWebAssembly binary

Using MIME types in development

Server-side configuration

Web servers (Apache / Nginx) map file extensions to MIME types. If misconfigured, browsers may fail to handle the file correctly — for example, a .webp file with the wrong MIME type may be downloaded instead of displayed inline.

Upload validation

When implementing file uploads, validate both extension and MIME type. Be aware that MIME types can be spoofed by the client, so combine them with magic-byte (file signature) validation for security.

Content-Type header

Set an appropriate Content-Type header on API responses and downloads. Use application/json for JSON, text/csv for CSV, and add a charset parameter (text/html; charset=utf-8) when needed.