MIME Types Reference
| Extension | MIME type | Used for |
|---|---|---|
| .html | text/html | Web pages |
| .css | text/css | Stylesheets |
| .js | text/javascript | JavaScript |
| .json | application/json | JSON data |
| .xml | application/xml | XML documents |
| .txt | text/plain | Plain text |
| .csv | text/csv | Comma-separated values |
| .md | text/markdown | Markdown |
| .png | image/png | PNG images |
| .jpg | image/jpeg | JPEG photos |
| .gif | image/gif | GIF images |
| .webp | image/webp | WebP images |
| .svg | image/svg+xml | SVG vector images |
| .ico | image/x-icon | Favicons |
| .avif | image/avif | AVIF images |
| .mp3 | audio/mpeg | MP3 audio |
| .wav | audio/wav | WAV audio |
| .ogg | audio/ogg | Ogg audio |
| .mp4 | video/mp4 | MP4 video |
| .webm | video/webm | WebM video |
| .mov | video/quicktime | QuickTime video |
| application/pdf | PDF documents | |
| .zip | application/zip | ZIP archives |
| .tar | application/x-tar | TAR archives |
| .gz | application/gzip | Gzip files |
| .7z | application/x-7z-compressed | 7Z archives |
| .rar | application/vnd.rar | RAR archives |
| .doc | application/msword | Word (legacy) |
| .docx | application/vnd.openxmlformats-officedocument.wordprocessingml.document | Word OOXML |
| .xls | application/vnd.ms-excel | Excel (legacy) |
| .xlsx | application/vnd.openxmlformats-officedocument.spreadsheetml.sheet | Excel OOXML |
| .ppt | application/vnd.ms-powerpoint | PowerPoint (legacy) |
| .pptx | application/vnd.openxmlformats-officedocument.presentationml.presentation | PowerPoint OOXML |
| .woff | font/woff | Web fonts |
| .woff2 | font/woff2 | Web fonts v2 |
| .ttf | font/ttf | TrueType fonts |
| .otf | font/otf | OpenType fonts |
| .wasm | application/wasm | WebAssembly |
| .bin | application/octet-stream | Generic binary |
| .form / POST | application/x-www-form-urlencoded | HTML form submissions |
| .json API | application/ld+json | JSON-LD structured data |
About
A MIME type (media type) is how a server tells a browser what a file actually is — the Content-Type header derived from this table is what stops a .png being served as text or a download being sniffed into HTML (an XSS vector, which is why X-Content-Type-Options: nosniff exists). The table covers the formats of daily web work. Two entries cause recurring bugs worth memorising: JavaScript is text/javascript (the old application/javascript is deprecated), and .svg is image/svg+xml — served wrong, SVG icons silently fail.
Frequently Asked Questions
Why does my file download instead of displaying?
The server sent application/octet-stream or a wrong type, or Content-Disposition: attachment. Check the response headers against this table.
Is the extension or the header authoritative?
The header — browsers act on Content-Type (with sniffing as the risky fallback nosniff disables). Extensions only matter to the server choosing the header.