MIME types lookup

Search the table by extension or type. For example .json is application/json and .svg is image/svg+xml.

ExtensionMIME typeDescription
.htmltext/htmlHTML document
.htmtext/htmlHTML document
.csstext/cssStylesheet
.jstext/javascriptJavaScript (RFC 9239)
.mjstext/javascriptJavaScript module
.jsonapplication/jsonJSON data
.jsonldapplication/ld+jsonJSON-LD
.xmlapplication/xmlXML document
.txttext/plainPlain text
.csvtext/csvComma-separated values
.tsvtext/tab-separated-valuesTab-separated values
.mdtext/markdownMarkdown
.icstext/calendariCalendar
.vcftext/vcardvCard contact
.yamlapplication/yamlYAML (RFC 9512)
.pngimage/pngPNG image
.jpgimage/jpegJPEG image
.jpegimage/jpegJPEG image
.gifimage/gifGIF image
.webpimage/webpWebP image
.avifimage/avifAVIF image
.svgimage/svg+xmlSVG vector image
.icoimage/vnd.microsoft.iconIcon (image/x-icon also common)
.bmpimage/bmpBitmap image
.tifimage/tiffTIFF image
.heicimage/heicHEIC image (iPhone photos)
.mp3audio/mpegMP3 audio
.wavaudio/wavWAV audio
.oggaudio/oggOgg audio
.ogaaudio/oggOgg audio
.flacaudio/flacFLAC audio
.aacaudio/aacAAC audio
.m4aaudio/mp4MPEG-4 audio
.webaaudio/webmWebM audio
.midaudio/midiMIDI
.opusaudio/opusOpus audio
.mp4video/mp4MP4 video
.webmvideo/webmWebM video
.ogvvideo/oggOgg video
.movvideo/quicktimeQuickTime video
.avivideo/x-msvideoAVI video
.mkvvideo/x-matroskaMatroska video
.m3u8application/vnd.apple.mpegurlHLS playlist
.tsvideo/mp2tMPEG transport stream
.wofffont/woffWeb font
.woff2font/woff2Web font 2
.ttffont/ttfTrueType font
.otffont/otfOpenType font
.pdfapplication/pdfPDF document
.zipapplication/zipZIP archive
.gzapplication/gzipGzip archive
.tarapplication/x-tarTar archive
.7zapplication/x-7z-compressed7-Zip archive
.rarapplication/vnd.rarRAR archive
.bz2application/x-bzip2Bzip2 archive
.docapplication/mswordWord 97–2003
.docxapplication/vnd.openxmlformats-officedocument.wordprocessingml.documentWord document
.xlsapplication/vnd.ms-excelExcel 97–2003
.xlsxapplication/vnd.openxmlformats-officedocument.spreadsheetml.sheetExcel workbook
.pptapplication/vnd.ms-powerpointPowerPoint 97–2003
.pptxapplication/vnd.openxmlformats-officedocument.presentationml.presentationPowerPoint presentation
.odtapplication/vnd.oasis.opendocument.textOpenDocument text
.odsapplication/vnd.oasis.opendocument.spreadsheetOpenDocument spreadsheet
.rtfapplication/rtfRich Text Format
.epubapplication/epub+zipEPUB e-book
.wasmapplication/wasmWebAssembly
.binapplication/octet-streamArbitrary binary
.exeapplication/vnd.microsoft.portable-executableWindows executable
.apkapplication/vnd.android.package-archiveAndroid package
.jarapplication/java-archiveJava archive
.shapplication/x-shShell script
.phpapplication/x-httpd-phpPHP (server-side)
.webmanifestapplication/manifest+jsonWeb app manifest
.mapapplication/jsonSource map
.gpxapplication/gpx+xmlGPS track
.kmlapplication/vnd.google-earth.kml+xmlKML map data
.geojsonapplication/geo+jsonGeoJSON
.sqlapplication/sqlSQL script
.atomapplication/atom+xmlAtom feed
.rssapplication/rss+xmlRSS feed
(form)application/x-www-form-urlencodedHTML form body
(upload)multipart/form-dataForm with file upload
(stream)text/event-streamServer-sent events

What a MIME type is

A MIME type (media type) is the type/subtype label in the Content-Type header that tells browsers how to handle a response. Browsers rely on it, not on the file extension, so a wrong value causes downloads instead of display, blocked scripts or broken fonts.

Headers to set with it

Content-Type: text/html; charset=utf-8
Content-Type: application/json
X-Content-Type-Options: nosniff

nosniff stops browsers from guessing a different type, which closes a class of content-sniffing attacks. Scripts served with a non-JavaScript type are then refused.

Frequently asked questions

Is it application/javascript or text/javascript?
RFC 9239 (2022) made text/javascript the standard; application/javascript is obsolete but still accepted.
What type should I use for unknown binary files?
application/octet-stream, which makes browsers download the file.