| Extension | MIME type | Description |
|---|---|---|
.html | text/html | HTML document |
.htm | text/html | HTML document |
.css | text/css | Stylesheet |
.js | text/javascript | JavaScript (RFC 9239) |
.mjs | text/javascript | JavaScript module |
.json | application/json | JSON data |
.jsonld | application/ld+json | JSON-LD |
.xml | application/xml | XML document |
.txt | text/plain | Plain text |
.csv | text/csv | Comma-separated values |
.tsv | text/tab-separated-values | Tab-separated values |
.md | text/markdown | Markdown |
.ics | text/calendar | iCalendar |
.vcf | text/vcard | vCard contact |
.yaml | application/yaml | YAML (RFC 9512) |
.png | image/png | PNG image |
.jpg | image/jpeg | JPEG image |
.jpeg | image/jpeg | JPEG image |
.gif | image/gif | GIF image |
.webp | image/webp | WebP image |
.avif | image/avif | AVIF image |
.svg | image/svg+xml | SVG vector image |
.ico | image/vnd.microsoft.icon | Icon (image/x-icon also common) |
.bmp | image/bmp | Bitmap image |
.tif | image/tiff | TIFF image |
.heic | image/heic | HEIC image (iPhone photos) |
.mp3 | audio/mpeg | MP3 audio |
.wav | audio/wav | WAV audio |
.ogg | audio/ogg | Ogg audio |
.oga | audio/ogg | Ogg audio |
.flac | audio/flac | FLAC audio |
.aac | audio/aac | AAC audio |
.m4a | audio/mp4 | MPEG-4 audio |
.weba | audio/webm | WebM audio |
.mid | audio/midi | MIDI |
.opus | audio/opus | Opus audio |
.mp4 | video/mp4 | MP4 video |
.webm | video/webm | WebM video |
.ogv | video/ogg | Ogg video |
.mov | video/quicktime | QuickTime video |
.avi | video/x-msvideo | AVI video |
.mkv | video/x-matroska | Matroska video |
.m3u8 | application/vnd.apple.mpegurl | HLS playlist |
.ts | video/mp2t | MPEG transport stream |
.woff | font/woff | Web font |
.woff2 | font/woff2 | Web font 2 |
.ttf | font/ttf | TrueType font |
.otf | font/otf | OpenType font |
.pdf | application/pdf | PDF document |
.zip | application/zip | ZIP archive |
.gz | application/gzip | Gzip archive |
.tar | application/x-tar | Tar archive |
.7z | application/x-7z-compressed | 7-Zip archive |
.rar | application/vnd.rar | RAR archive |
.bz2 | application/x-bzip2 | Bzip2 archive |
.doc | application/msword | Word 97–2003 |
.docx | application/vnd.openxmlformats-officedocument.wordprocessingml.document | Word document |
.xls | application/vnd.ms-excel | Excel 97–2003 |
.xlsx | application/vnd.openxmlformats-officedocument.spreadsheetml.sheet | Excel workbook |
.ppt | application/vnd.ms-powerpoint | PowerPoint 97–2003 |
.pptx | application/vnd.openxmlformats-officedocument.presentationml.presentation | PowerPoint presentation |
.odt | application/vnd.oasis.opendocument.text | OpenDocument text |
.ods | application/vnd.oasis.opendocument.spreadsheet | OpenDocument spreadsheet |
.rtf | application/rtf | Rich Text Format |
.epub | application/epub+zip | EPUB e-book |
.wasm | application/wasm | WebAssembly |
.bin | application/octet-stream | Arbitrary binary |
.exe | application/vnd.microsoft.portable-executable | Windows executable |
.apk | application/vnd.android.package-archive | Android package |
.jar | application/java-archive | Java archive |
.sh | application/x-sh | Shell script |
.php | application/x-httpd-php | PHP (server-side) |
.webmanifest | application/manifest+json | Web app manifest |
.map | application/json | Source map |
.gpx | application/gpx+xml | GPS track |
.kml | application/vnd.google-earth.kml+xml | KML map data |
.geojson | application/geo+json | GeoJSON |
.sql | application/sql | SQL script |
.atom | application/atom+xml | Atom feed |
.rss | application/rss+xml | RSS feed |
(form) | application/x-www-form-urlencoded | HTML form body |
(upload) | multipart/form-data | Form with file upload |
(stream) | text/event-stream | Server-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.