loot.tools

MIME Type Lookup

Look up the right Content-Type for a file extension, or go the other way and find which extensions a media type covers. Search the table by extension, type, or name and click a type to copy it. Covers the formats you actually set headers for - documents, images, audio and video, fonts, archives, code, and data. Runs entirely in your browser.

Text

ExtensionMIME typeName
.txt .text .logPlain text
.html .htmHTML document
.cssCascading style sheet
.csvComma-separated values
.md .markdownMarkdown
.icsiCalendar
.tsvTab-separated values
.yaml .ymlYAML (common, unregistered)
.xmlXML (text variant)

Image

ExtensionMIME typeName
.pngPNG image
.jpg .jpeg .jfifJPEG image
.gifGIF image
.webpWebP image
.avifAVIF image
.svgSVG vector image
.icoIcon (favicon)
.bmpBitmap image
.tif .tiffTIFF image
.heicHEIC image
.icoIcon (registered form)

Audio

ExtensionMIME typeName
.mp3MP3 audio
.wavWAV audio
.ogg .ogaOgg audio
.webaWebM audio
.aacAAC audio
.flacFLAC audio
.mid .midiMIDI

Video

ExtensionMIME typeName
.mp4 .m4vMP4 video
.webmWebM video
.ogvOgg video
.movQuickTime video
.aviAVI video
.tsMPEG transport stream
.mkvMatroska video

Font

ExtensionMIME typeName
.woff2WOFF 2.0 font
.woffWOFF font
.ttfTrueType font
.otfOpenType font
.eotEmbedded OpenType font

Application

ExtensionMIME typeName
.jsonJSON
.jsonldJSON-LD
.xmlXML (application variant)
.js .mjsJavaScript
.wasmWebAssembly
.webmanifestWeb app manifest
.binArbitrary binary data
n/aURL-encoded form data
.sqlSQL
.pdfPDF document
.rtfRich Text Format
.docMicrosoft Word (legacy)
.docxMicrosoft Word (DOCX)
.xlsMicrosoft Excel (legacy)
.xlsxMicrosoft Excel (XLSX)
.pptMicrosoft PowerPoint (legacy)
.pptxMicrosoft PowerPoint (PPTX)
.odtOpenDocument text
.odsOpenDocument spreadsheet
.epubEPUB e-book

Archive

ExtensionMIME typeName
.zipZIP archive
.gzGzip archive
.tarTar archive
.7z7-Zip archive
.rarRAR archive
.bz2Bzip2 archive

What a MIME type is

A MIME type (also called a media type or content type) is a short label like image/png or application/json that tells software what kind of data a file or response holds. Servers send it in the Content-Type header, browsers use it to decide how to handle a download, and APIs use it to negotiate formats. It's two parts joined by a slash: a top-level type (text, image, application) and a subtype.

How to use this

Type a file extension like woff2 or .pdf to see its media type, or paste a type like video/mp4 to see which extensions use it. You can also search by name (try 'spreadsheet' or 'font'). Click any type to copy it to your clipboard. The leading dot on an extension is optional.

When the extension maps to more than one type

Some extensions have more than one registered type. An .xml file is text/xml or application/xml, and an icon is image/x-icon or image/vnd.microsoft.icon. Both forms appear here so you can pick the one your stack expects. When you genuinely don't know a file's type, application/octet-stream is the safe generic fallback for raw binary data.

Why getting it right matters

  • Browsers may refuse to run a script or stylesheet served with the wrong type when X-Content-Type-Options: nosniff is set
  • File uploads are often validated against an allowlist of types
  • A font served as text/plain won't load
  • And a JSON API that returns text/html can break clients that check the response type
  • Setting an accurate Content-Type avoids all of these