Cheat Sheet · Free Reference
MIME Types Reference
Complete MIME types reference with content types, file extensions, and descriptions for text, application, image, audio, video, font, and multipart.
Searchable, copyable, always up to date.
Text
MIME types for human-readable text content and markup languages.
| MIME Type | Extension | Description |
|---|---|---|
text/plain | .txt | Plain text with no formatting |
text/html | .html, .htm | HTML document |
text/css | .css | Cascading Style Sheets |
text/javascript | .js, .mjs | JavaScript source code |
text/csv | .csv | Comma-separated values |
text/xml | .xml | XML document (text-readable) |
text/markdown | .md, .markdown | Markdown formatted text |
Application
MIME types for binary data, structured formats, and application-specific content.
| MIME Type | Extension | Description |
|---|---|---|
application/json | .json | JSON data |
application/xml | .xml | XML document (application-level) |
application/pdf | Portable Document Format | |
application/zip | .zip | ZIP archive |
application/gzip | .gz | Gzip compressed archive |
application/x-tar | .tar | Tape archive (uncompressed) |
application/octet-stream | (any) | Arbitrary binary data (default for unknown types) |
application/x-www-form-urlencoded | — | HTML form data encoded as key-value pairs |
application/javascript | .js | JavaScript (preferred over text/javascript in some contexts) |
application/ld+json | .jsonld | JSON-LD linked data |
application/wasm | .wasm | WebAssembly binary module |
application/x-httpd-php | .php | PHP source file |
application/x-sh | .sh | Unix shell script |
application/sql | .sql | SQL query file |
application/graphql | .graphql | GraphQL query language |
application/rtf | .rtf | Rich Text Format |
application/x-7z-compressed | .7z | 7-Zip compressed archive |
application/vnd.ms-excel | .xls | Microsoft Excel (legacy format) |
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet | .xlsx | Microsoft Excel (OpenXML) |
application/msword | .doc | Microsoft Word (legacy format) |
application/vnd.openxmlformats-officedocument.wordprocessingml.document | .docx | Microsoft Word (OpenXML) |
Image
MIME types for image formats used on the web and in documents.
| MIME Type | Extension | Description |
|---|---|---|
image/jpeg | .jpg, .jpeg | JPEG image (lossy compression) |
image/png | .png | PNG image (lossless compression) |
image/gif | .gif | GIF image (supports animation) |
image/webp | .webp | WebP image (modern format, lossy/lossless) |
image/svg+xml | .svg | Scalable Vector Graphics |
image/x-icon | .ico | ICO icon format (favicons) |
image/avif | .avif | AVIF image (next-gen format) |
image/bmp | .bmp | Bitmap image (uncompressed) |
image/tiff | .tiff, .tif | TIFF image (print and archival) |
Audio
MIME types for audio formats and codecs.
| MIME Type | Extension | Description |
|---|---|---|
audio/mpeg | .mp3 | MP3 audio (lossy compression) |
audio/ogg | .ogg, .oga | Ogg Vorbis audio |
audio/wav | .wav | WAV audio (uncompressed PCM) |
audio/webm | .weba | WebM audio |
audio/aac | .aac | AAC audio (Advanced Audio Coding) |
audio/flac | .flac | FLAC audio (lossless compression) |
Video
MIME types for video container formats.
| MIME Type | Extension | Description |
|---|---|---|
video/mp4 | .mp4 | MP4 video (H.264/H.265) |
video/webm | .webm | WebM video (VP8/VP9/AV1) |
video/ogg | .ogv | Ogg Theora video |
video/mpeg | .mpeg, .mpg | MPEG video |
Font
MIME types for web font formats.
| MIME Type | Extension | Description |
|---|---|---|
font/woff | .woff | Web Open Font Format |
font/woff2 | .woff2 | Web Open Font Format 2 (better compression) |
font/ttf | .ttf | TrueType Font |
font/otf | .otf | OpenType Font |
Multipart
MIME types for multi-part message bodies, commonly used in form submissions and HTTP responses.
| MIME Type | Extension | Description |
|---|---|---|
multipart/form-data | — | Form data with file uploads (used in HTML forms with enctype) |
multipart/byteranges | — | Partial content responses (HTTP 206 with multiple ranges) |
Frequently Asked Questions
A MIME type (Multipurpose Internet Mail Extensions type), also known as a media type or content type, is a standard identifier used to indicate the nature and format of a file or data. It consists of a type and subtype separated by a slash (e.g.,
text/html, application/json). MIME types are used in HTTP Content-Type headers, email attachments, and file upload handling to tell browsers and servers how to process data.The HTTP
Content-Type header tells the browser or client what MIME type the response body contains. For example, Content-Type: application/json indicates JSON data, while Content-Type: text/html; charset=utf-8 indicates an HTML document with UTF-8 encoding. Without the correct Content-Type header, browsers may misinterpret the data, leading to rendering errors or security vulnerabilities like MIME-type sniffing attacks.Incorrect or missing MIME types can lead to MIME-type sniffing attacks, where a browser guesses the content type and may execute malicious content. For example, an attacker could upload a file with an image extension but containing JavaScript; if the server serves it without a proper
Content-Type and without the X-Content-Type-Options: nosniff header, the browser might execute the script. Always set accurate Content-Type headers and use X-Content-Type-Options: nosniff to prevent sniffing.