YouTip LogoYouTip

Mime Types

MIME (Multipurpose Internet Mail Extensions) is a standard that describes the message content type, used to represent the nature and format of documents, files, or byte streams. MIME messages can contain text, images, audio, video, and other data dedicated to specific applications. Browsers typically use MIME types (rather than file extensions) to determine how to handle a URL, so it is very important for web servers to add the correct MIME type in the response header. If configured incorrectly, browsers may not be able to parse the file content, the website may not work properly, and downloaded files may be handled incorrectly. ### Syntax General MIME type structure: type/subtype The MIME structure is very simple, consisting of a type and subtype separated by a slash, with no spaces allowed. The type represents an independent category that can be divided into multiple subclasses, and the subtype represents eachEach subdivided type. MIME types are case-insensitive, but traditionally written in lowercase. Two main MIME types play important roles as default types: * **text/plain** represents the default value for text files. * **application/octet-stream** represents the default value for all other cases. ### Common MIME Types * HyperText Markup Language text **.html、.html**:text/html * Plain text **.txt**: text/plain * RTF text **.rtf**: application/rtf * GIF image **.gif**: image/gif * JPEG image **.jpeg、.jpg**: image/jpeg * au audio file **.au**: audio/basic * MIDI music file **mid、.midi**: audio/midi、audio/x-midi * RealAudio music file **.ra、.ram**: audio/x-pn-realaudio * MPEG file **.mpg、.mpeg**: video/mpeg * AVI file **.avi**: video/x-msvideo * GZIP file **.gz**: application/x-gzip * TAR file **.tar**: application/x-tar | Type | Description | Typical Examples | | --- | --- | --- | | `text` | Indicates the file is plain text, theoretically human-readable | `text/plain`, `text/html`, `text/css, text/javascript` | | `image` | Indicates some kind of image. Does not include video, but dynamic images (like animated gifs) also use the image type | `image/gif`, `image/png`, `image/jpeg`, `image/bmp`, `image/webp`, `image/x-icon`, `image/vnd.microsoft.icon` | | `audio` | Indicates some kind of audio file | `audio/midi`, `audio/mpeg, audio/webm, audio/ogg, audio/wav` | | `video` | Indicates some kind of video file | `video/webm`, `video/ogg` | | `application` | Indicates some kind of binary data | `application/octet-stream`, `application/pkcs12`, `application/vnd.mspowerpoint`, `application/xhtml+xml`, `application/xml`,`application/pdf` | ## MIME Reference Table | Media Type | File Extension | Description | | --- | --- | --- | | **application/msword** | doc | Microsoft Office Word format (Microsoft Word 97 - 2004 document) | | **application/vnd.openxmlformats-officedocument.wordprocessingml.document** | docx | Microsoft Office Word document format | | **application/vnd.ms-excel** | xls | Microsoft Office Excel format (Microsoft Excel 97 - 2004 Workbook | | **application/vnd.openxmlformats-officedocument.spreadsheetml.sheet** | xlsx | Microsoft Office Excel document format | | **application/vnd.ms-powerpoint** | ppt | Microsoft Office PowerPoint format (Microsoft PowerPoint 97 - 2003 presentation) | | **application/vnd.openxmlformats-officedocument.presentationml.presentation** | pptx | Microsoft Office PowerPoint presentation format | | **application/x-gzip** | gz, gzip | GZ compressed file format | | **application/zip** | zip, 7zip | ZIP compressed file format | | **application/rar** | rar | RAR compressed file format | | **application/x-tar** | tar, tgz | TAR compressed file format | | **application/pdf** | pdf | PDF stands for Portable Document Format | | **application/rtf** | rtf | RTF stands for Rich Text Format | | **image/gif** | gif | GIF image format | | **image/jpeg** | jpg, jpeg | JPG(JPEG) image format | | **image/jp2** | jpg2 | JPG2 image format | | **image/png** | png | PNG image format | | **image/tiff** | tif, tiff | TIF(TIFF) image format | | **image/bmp** | bmp | BMP image format (bitmap format) | | **image/svg+xml** | svg, svgz | SVG image format | | **image/webp** | webp | WebP image format | | **image/x-icon** | ico | ico image format, typically used for browser Favicon icons | | **application/kswps** | wps | Kingsoft Office text formatting file format | | **application/kset** | et | Kingsoft Office spreadsheet file format | | **application/ksdps** | dps | Kingsoft Office presentation format | | **application/x-photoshop** | psd | Photoshop source file format | | **application/x-coreldraw** | cdr | Coreldraw source file format | | **application/x-shockwave-flash** | swf | Adobe Flash source file format | | **text/plain** | txt | Plain text format | | **application/x-javascript** | js | Javascript file type | | **text/javascript** | js | Represents Javascript script file | | **text/css** | css | Represents CSS stylesheet | | **text/html** | htm, html, shtml | HTML file format | | **application
← Julia Date TimeJulia Flow Control β†’