MIME types
A MIME type — the value of the Content-Type header — is how a server says what a file is. Nothing about the filename reaches the browser, so the extension is a hint for you and the type is the fact for the client. Get it wrong and a stylesheet is ignored, a font fails to load, or a PDF downloads when it should have opened.
This page lists the extension and the type the site's own lookup tool returns for it, so the two can never disagree. Where several extensions share one type — jpg, jpeg and jpe, or yaml and yml — each is listed on its own row, because you look up the one you have.
Two rules explain most of the surprises below. A type beginning application/vnd. is a vendor's registration rather than an open standard, which is why the Office types are so long. And a type the server does not know is best sent as application/octet-stream, which tells the browser to download rather than to guess.
Web and text
21text/* is the family a browser will show rather than download, and the only one where a charset parameter matters — text/html; charset=utf-8.
| Extension | MIME type | What it is |
|---|---|---|
| .html | text/html | HTML document |
| .htm | text/html | HTML document, the short extension |
| .shtml | text/html | HTML with server-side includes |
| .xhtml | application/xhtml+xml | XHTML document |
| .css | text/css | Stylesheet |
| .csv | text/csv | Comma-separated values |
| .txt | text/plain | Plain text |
| .md | text/markdown | Markdown source |
| .ics | text/calendar | Calendar event |
| .xml | application/xml | XML document |
| .js | text/javascript | JavaScript |
| .mjs | text/javascript | JavaScript ES module |
| .json | application/json | JSON data |
| .jsonld | application/ld+json | JSON-LD structured data |
| .webmanifest | application/manifest+json | Web app manifest |
| .yaml | application/yaml | YAML document |
| .yml | application/yaml | YAML, the short extension |
| .toml | application/toml | TOML configuration |
| .sql | application/sql | SQL script |
| .sh | application/x-sh | Shell script |
| .wasm | application/wasm | WebAssembly module |
Documents
12The Office types are long because they encode the vendor, the standard and the part — vnd. means a vendor registration rather than an open format.
| Extension | MIME type | What it is |
|---|---|---|
| application/pdf | PDF document | |
| .rtf | application/rtf | Rich text |
| .doc | application/msword | Word document, legacy binary |
| .docx | application/vnd.openxmlformats-officedocument.wordprocessingml.document | Word document |
| .xls | application/vnd.ms-excel | Excel workbook, legacy binary |
| .xlsx | application/vnd.openxmlformats-officedocument.spreadsheetml.sheet | Excel workbook |
| .ppt | application/vnd.ms-powerpoint | PowerPoint presentation, legacy binary |
| .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 |
| .odp | application/vnd.oasis.opendocument.presentation | OpenDocument presentation |
| .epub | application/epub+zip | EPUB e-book |
Images
14Every image type is sniffable from its first bytes, so a browser will usually render one correctly even when the server labels it wrong. SVG is the exception you should never mislabel — it is a document that can carry script.
| Extension | MIME type | What it is |
|---|---|---|
| .png | image/png | PNG image |
| .jpg | image/jpeg | JPEG image |
| .jpeg | image/jpeg | JPEG image, the long extension |
| .jpe | image/jpeg | JPEG image, a rare extension |
| .gif | image/gif | GIF image |
| .webp | image/webp | WebP image |
| .avif | image/avif | AVIF image |
| .svg | image/svg+xml | SVG vector image |
| .bmp | image/bmp | Bitmap image |
| .ico | image/vnd.microsoft.icon | Icon file |
| .tif | image/tiff | TIFF image |
| .tiff | image/tiff | TIFF image, the long extension |
| .heic | image/heic | HEIC image |
| .heif | image/heif | HEIF image |
Audio
11Container and codec are different questions. audio/ogg says how the file is wrapped; what is inside it may be Vorbis, Opus or FLAC.
| Extension | MIME type | What it is |
|---|---|---|
| .mp3 | audio/mpeg | MP3 audio |
| .wav | audio/wav | WAV audio |
| .ogg | audio/ogg | Ogg audio |
| .oga | audio/ogg | Ogg audio, the explicit extension |
| .opus | audio/opus | Opus audio |
| .m4a | audio/mp4 | AAC audio in an MP4 container |
| .flac | audio/flac | FLAC lossless audio |
| .weba | audio/webm | WebM audio |
| .aac | audio/aac | Raw AAC audio |
| .mid | audio/midi | MIDI sequence |
| .midi | audio/midi | MIDI, the long extension |
Video
9Streaming a video needs more than the right type — the server also has to answer range requests, or the browser downloads the whole file before it plays.
| Extension | MIME type | What it is |
|---|---|---|
| .mp4 | video/mp4 | MP4 video |
| .m4v | video/mp4 | MP4 video, Apple's extension |
| .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 |
| .wmv | video/x-ms-wmv | Windows Media video |
| .3gp | video/3gpp | 3GPP mobile video |
Fonts
5The font/* family was registered late; older tooling still emits application/font-woff and application/x-font-ttf, which browsers accept but should not be written for anything new.
| Extension | MIME type | What it is |
|---|---|---|
| .woff | font/woff | WOFF web font |
| .woff2 | font/woff2 | WOFF2 web font |
| .ttf | font/ttf | TrueType font |
| .otf | font/otf | OpenType font |
| .eot | application/vnd.ms-fontobject | Embedded OpenType, Internet Explorer only |
Archives and binaries
12application/octet-stream is the honest answer when nothing better is known, and it is also what forces a download instead of a render.
| Extension | MIME type | What it is |
|---|---|---|
| .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 |
| .iso | application/x-iso9660-image | Disc image |
| .bin | application/octet-stream | Unknown binary data |
| .exe | application/x-msdownload | Windows executable |
| .apk | application/vnd.android.package-archive | Android package |
| .deb | application/vnd.debian.binary-package | Debian package |
| .swf | application/x-shockwave-flash | Flash movie, long obsolete |