MIME Types Cheat Sheet — Common Content-Types for Web Developers (2025)
A printable MIME type reference for web developers. Copy-paste Content-Type values for server configuration, API responses, and file serving.
Document MIME Types
| Extension | MIME Type | Name |
|-----------|----------|------|
| .pdf | application/pdf | PDF Document |
| .doc | application/msword | Word (Legacy) |
| .docx | application/vnd.openxmlformats-officedocument.wordprocessingml.document | Word |
| .xls | application/vnd.ms-excel | Excel (Legacy) |
| .xlsx | application/vnd.openxmlformats-officedocument.spreadsheetml.sheet | Excel |
| .pptx | application/vnd.openxmlformats-officedocument.presentationml.presentation | PowerPoint |
| .epub | application/epub+zip | EPUB Ebook |
| .rtf | application/rtf | Rich Text |
Image MIME Types
| Extension | MIME Type | Name |
|-----------|----------|------|
| .jpg/.jpeg | image/jpeg | JPEG Image |
| .png | image/png | PNG Image |
| .gif | image/gif | GIF Image |
| .webp | image/webp | WebP Image |
| .avif | image/avif | AVIF Image |
| .heic | image/heic | HEIC (iPhone) |
| .svg | image/svg+xml | SVG Vector |
| .ico | image/x-icon | ICO Favicon |
| .bmp | image/bmp | BMP Bitmap |
| .tiff | image/tiff | TIFF Image |
Video MIME Types
| Extension | MIME Type | Name |
|-----------|----------|------|
| .mp4 | video/mp4 | MP4 Video |
| .webm | video/webm | WebM Video |
| .mkv | video/x-matroska | MKV Matroska |
| .mov | video/quicktime | QuickTime |
| .avi | video/x-msvideo | AVI Video |
| .m3u8 | application/vnd.apple.mpegurl | HLS Playlist |
Audio MIME Types
| Extension | MIME Type | Name |
|-----------|----------|------|
| .mp3 | audio/mpeg | MP3 Audio |
| .wav | audio/wav | WAV Audio |
| .flac | audio/flac | FLAC Lossless |
| .aac | audio/aac | AAC Audio |
| .ogg | audio/ogg | OGG Vorbis |
| .opus | audio/opus | Opus Audio |
| .m4a | audio/mp4 | M4A (AAC) |
| .midi | audio/midi | MIDI |
Font MIME Types
| Extension | MIME Type | Name |
|-----------|----------|------|
| .ttf | font/ttf | TrueType |
| .otf | font/otf | OpenType |
| .woff | font/woff | WOFF |
| .woff2 | font/woff2 | WOFF2 |
Data / Config MIME Types
| Extension | MIME Type | Name |
|-----------|----------|------|
| .json | application/json | JSON |
| .xml | application/xml | XML |
| .yaml/.yml | text/yaml | YAML |
| .toml | application/toml | TOML |
| .csv | text/csv | CSV |
| .sql | application/sql | SQL |
| .txt | text/plain | Plain Text |
| .md | text/markdown | Markdown |
| .html | text/html | HTML |
| .css | text/css | CSS |
| .js | text/javascript | JavaScript |
| .wasm | application/wasm | WebAssembly |
Archive MIME Types
| Extension | MIME Type | Name |
|-----------|----------|------|
| .zip | application/zip | ZIP |
| .tar.gz/.tgz | application/gzip | Gzip Tarball |
| .tar.bz2 | application/x-bzip2 | Bzip2 Tarball |
| .7z | application/x-7z-compressed | 7-Zip |
| .rar | application/vnd.rar | RAR |
| .gz | application/gzip | Gzip |
Server Configuration Snippets
Nginx
types {
# Modern image formats
image/avif avif;
image/webp webp;
image/heic heic heif;
# Web fonts
font/woff2 woff2;
font/woff woff;
font/ttf ttf;
font/otf otf;
# Data formats
application/json json;
text/yaml yaml yml;
application/toml toml;
text/markdown md markdown;
# WebAssembly
application/wasm wasm;
}
Apache (.htaccess)
# Modern image formats
AddType image/avif .avif
AddType image/webp .webp
AddType image/heic .heic .heif
# Web fonts (with CORS)
AddType font/woff2 .woff2
AddType font/woff .woff
<FilesMatch "\.(ttf|otf|woff|woff2)$">
Header set Access-Control-Allow-Origin "*"
</FilesMatch>
# Data formats
AddType application/json .json
AddType text/yaml .yaml .yml
AddType application/toml .toml
# Force download (not inline)
<FilesMatch "\.(pdf|doc|docx|xls|xlsx)$">
Header set Content-Disposition attachment
</FilesMatch>
Express.js
const express = require('express');
const app = express();
// Serve static files with correct MIME types
app.use(express.static('public', {
setHeaders: (res, path) => {
if (path.endsWith('.avif')) res.type('image/avif');
if (path.endsWith('.woff2')) res.type('font/woff2');
if (path.endsWith('.wasm')) res.type('application/wasm');
}
}));
// API response with explicit Content-Type
app.get('/api/data', (req, res) => {
res.setHeader('Content-Type', 'application/json');
res.json({ data: [] });
});
// Force download
app.get('/download/:file', (req, res) => {
res.setHeader('Content-Disposition', 'attachment');
res.sendFile(req.params.file);
});
For a searchable, filterable MIME type database, use our MIME Type Lookup Tool.