Mime text plain text html

Common MIME types

This topic lists the most common MIME types with corresponding document types, ordered by their common extensions.

The following two important MIME types are the default types:

  • text/plain is the default value for textual files. A textual file should be human-readable and must not contain binary data.
  • application/octet-stream is the default value for all other cases. An unknown file type should use this type. Browsers are particularly careful when manipulating these files to protect users from software vulnerabilities and possible dangerous behavior.

IANA is the official registry of MIME media types and maintains a list of all the official MIME types. This table lists important MIME types for the Web:

Extension Kind of document MIME Type
.aac AAC audio audio/aac
.abw AbiWord document application/x-abiword
.arc Archive document (multiple files embedded) application/x-freearc
.avif AVIF image image/avif
.avi AVI: Audio Video Interleave video/x-msvideo
.azw Amazon Kindle eBook format application/vnd.amazon.ebook
.bin Any kind of binary data application/octet-stream
.bmp Windows OS/2 Bitmap Graphics image/bmp
.bz BZip archive application/x-bzip
.bz2 BZip2 archive application/x-bzip2
.cda CD audio application/x-cdf
.csh C-Shell script application/x-csh
.css Cascading Style Sheets (CSS) text/css
.csv Comma-separated values (CSV) text/csv
.doc Microsoft Word application/msword
.docx Microsoft Word (OpenXML) application/vnd.openxmlformats-officedocument.wordprocessingml.document
.eot MS Embedded OpenType fonts application/vnd.ms-fontobject
.epub Electronic publication (EPUB) application/epub+zip
.gz GZip Compressed Archive application/gzip
.gif Graphics Interchange Format (GIF) image/gif
.htm , .html HyperText Markup Language (HTML) text/html
.ico Icon format image/vnd.microsoft.icon
.ics iCalendar format text/calendar
.jar Java Archive (JAR) application/java-archive
.jpeg , .jpg JPEG images image/jpeg
.js JavaScript text/javascript (Specifications: HTML and RFC 9239)
.json JSON format application/json
.jsonld JSON-LD format application/ld+json
.mid , .midi Musical Instrument Digital Interface (MIDI) audio/midi , audio/x-midi
.mjs JavaScript module text/javascript
.mp3 MP3 audio audio/mpeg
.mp4 MP4 video video/mp4
.mpeg MPEG Video video/mpeg
.mpkg Apple Installer Package application/vnd.apple.installer+xml
.odp OpenDocument presentation document application/vnd.oasis.opendocument.presentation
.ods OpenDocument spreadsheet document application/vnd.oasis.opendocument.spreadsheet
.odt OpenDocument text document application/vnd.oasis.opendocument.text
.oga OGG audio audio/ogg
.ogv OGG video video/ogg
.ogx OGG application/ogg
.opus Opus audio audio/opus
.otf OpenType font font/otf
.png Portable Network Graphics image/png
.pdf Adobe Portable Document Format (PDF) application/pdf
.php Hypertext Preprocessor (Personal Home Page) application/x-httpd-php
.ppt Microsoft PowerPoint application/vnd.ms-powerpoint
.pptx Microsoft PowerPoint (OpenXML) application/vnd.openxmlformats-officedocument.presentationml.presentation
.rar RAR archive application/vnd.rar
.rtf Rich Text Format (RTF) application/rtf
.sh Bourne shell script application/x-sh
.svg Scalable Vector Graphics (SVG) image/svg+xml
.tar Tape Archive (TAR) application/x-tar
.tif , .tiff Tagged Image File Format (TIFF) image/tiff
.ts MPEG transport stream video/mp2t
.ttf TrueType Font font/ttf
.txt Text, (generally ASCII or ISO 8859-n) text/plain
.vsd Microsoft Visio application/vnd.visio
.wav Waveform Audio Format audio/wav
.weba WEBM audio audio/webm
.webm WEBM video video/webm
.webp WEBP image image/webp
.woff Web Open Font Format (WOFF) font/woff
.woff2 Web Open Font Format (WOFF) font/woff2
.xhtml XHTML application/xhtml+xml
.xls Microsoft Excel application/vnd.ms-excel
.xlsx Microsoft Excel (OpenXML) application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
.xml XML application/xml is recommended as of RFC 7303 (section 4.1), but text/xml is still used sometimes. You can assign a specific MIME type to a file with .xml extension depending on how its contents are meant to be interpreted. For instance, an Atom feed is application/atom+xml , but application/xml serves as a valid default.
.xul XUL application/vnd.mozilla.xul+xml
.zip ZIP archive application/zip
.3gp 3GPP audio/video container video/3gpp ; audio/3gpp if it doesn’t contain video
.3g2 3GPP2 audio/video container video/3gpp2 ; audio/3gpp2 if it doesn’t contain video
.7z 7-zip archive application/x-7z-compressed
Читайте также:  Парсинг логических выражений python

Found a content problem with this page?

This page was last modified on Apr 10, 2023 by MDN contributors.

Источник

MIME-типы

MIME (Multipurpose Internet Mail Extension, Многоцелевые расширения почты Интернета) — спецификация для передачи по сети файлов различного типа: изображений, музыки, текстов, видео, архивов и др. Указание MIME-типа используется в HTML обычно при передаче данных форм и вставки на страницу различных объектов.

Некоторые популярные MIME-типы и расширения файлов с ними связанных приведены в табл. 1.

Табл. 1. MIME-типы

Расширение файла Тип данных
ai application/postscript
aif audio/aiff
aif audio/x-aiff
aiff audio/aiff
aiff audio/x-aiff
ani application/x-navi-animation
aos application/x-nokia-9000-communicator-add-on-software
aps application/mime
arc application/octet-stream
arj application/arj
arj application/octet-stream
art image/x-jg
asf video/x-ms-asf
asm text/x-asm
asp text/asp
asx application/x-mplayer2
asx video/x-ms-asf
asx video/x-ms-asf-plugin
au audio/basic
au audio/x-au
avi application/x-troff-msvideo
avi video/avi
avi video/msvideo
avi video/x-msvideo
bin application/mac-binary
bin application/macbinary
bin application/octet-stream
bin application/x-binary
bin application/x-macbinary
bm image/bmp
bmp image/bmp
bmp image/x-windows-bmp
boo application/book
book application/book
c text/x-c
c++ text/plain
ccad application/clariscad
class application/java
class application/java-byte-code
class application/x-java-class
com application/octet-stream
com text/plain
conf text/plain
cpp text/x-c
cpt application/mac-compactpro
cpt application/x-compactpro
cpt application/x-cpt
css application/x-pointplus
css text/css
dcr application/x-director
def text/plain
dif video/x-dv
dir application/x-director
dl video/dl
dl video/x-dl
doc application/msword
dot application/msword
drw application/drafting
dvi application/x-dvi
dwg application/acad
dwg image/vnd.dwg
dwg image/x-dwg
dxf application/dxf
dxf image/vnd.dwg
dxf image/x-dwg
dxr application/x-director
exe application/octet-stream
gif image/gif
gz application/x-compressed
gz application/x-gzip
gzip application/x-gzip
gzip multipart/x-gzip
h text/plain
h text/x-h
hlp application/hlp
hlp application/x-helpfile
hlp application/x-winhelp
htc text/x-component
htm text/html
html text/html
htmls text/html
htt text/webviewhtml
ice x-conference/x-cooltalk
ico image/x-icon
inf application/inf
jam audio/x-jam
jav text/plain
jav text/x-java-source
java text/plain
java text/x-java-source
jcm application/x-java-commerce
jfif image/jpeg
jfif image/pjpeg
jfif-tbnl image/jpeg
jpe image/jpeg
jpe image/pjpeg
jpeg image/jpeg
jpeg image/pjpeg
jpg image/jpeg
jpg image/pjpeg
jps image/x-jps
js application/x-javascript
js application/javascript
js application/ecmascript
js text/javascript
js text/ecmascript
latex application/x-latex
lha application/lha
lha application/octet-stream
lha application/x-lha
lhx application/octet-stream
list text/plain
lsp application/x-lisp
lsp text/x-script.lisp
lst text/plain
lzh application/octet-stream
lzh application/x-lzh
lzx application/lzx
lzx application/octet-stream
lzx application/x-lzx
m3u audio/x-mpequrl
man application/x-troff-man
mid application/x-midi
mid audio/midi
mid audio/x-mid
mid audio/x-midi
mid music/crescendo
mid x-music/x-midi
midi application/x-midi
midi audio/midi
midi audio/x-mid
midi audio/x-midi
midi music/crescendo
midi x-music/x-midi
mod audio/mod
mod audio/x-mod
mov video/quicktime
movie video/x-sgi-movie
mp2 audio/mpeg
mp2 audio/x-mpeg
mp2 video/mpeg
mp2 video/x-mpeg
mp2 video/x-mpeq2a
mp3 audio/mpeg3
mp3 audio/x-mpeg-3
mp3 video/mpeg
mp3 video/x-mpeg
mp4 video/mp4
mpa audio/mpeg
mpa video/mpeg
mpeg video/mpeg
mpg audio/mpeg
mpg video/mpeg
mpga audio/mpeg
pas text/pascal
pcl application/vnd.hp-pcl
pcl application/x-pcl
pct image/x-pict
pcx image/x-pcx
pdf application/pdf
pic image/pict
pict image/pict
pl text/plain
pl text/x-script.perl
pm image/x-xpixmap
pm text/x-script.perl-module
pm4 application/x-pagemaker
pm5 application/x-pagemaker
png image/png
pot application/mspowerpoint
pot application/vnd.ms-powerpoint
ppa application/vnd.ms-powerpoint
pps application/mspowerpoint
pps application/vnd.ms-powerpoint
ppt application/mspowerpoint
ppt application/powerpoint
ppt application/vnd.ms-powerpoint
ppt application/x-mspowerpoint
ppz application/mspowerpoint
ps application/postscript
psd application/octet-stream
pwz application/vnd.ms-powerpoint
py text/x-script.phyton
pyc applicaiton/x-bytecode.python
qt video/quicktime
qtif image/x-quicktime
ra audio/x-pn-realaudio
ra audio/x-pn-realaudio-plugin
ra audio/x-realaudio
ram audio/x-pn-realaudio
rm application/vnd.rn-realmedia
rm audio/x-pn-realaudio
rpm audio/x-pn-realaudio-plugin
rtf application/rtf
rtf application/x-rtf
rtf text/richtext
rtx application/rtf
rtx text/richtext
rv video/vnd.rn-realvideo
sgml text/sgml
sgml text/x-sgml
sh application/x-bsh
sh application/x-sh
sh application/x-shar
sh text/x-script.sh
shtml text/html
shtml text/x-server-parsed-html
ssi text/x-server-parsed-html
tar application/x-tar
tcl application/x-tcl
tcl text/x-script.tcl
text application/plain
text text/plain
tgz application/gnutar
tgz application/x-compressed
tif image/tiff
tif image/x-tiff
tiff image/tiff
tiff image/x-tiff
txt text/plain
uri text/uri-list
vcd application/x-cdlink
vmd application/vocaltec-media-desc
vrml application/x-vrml
vrml model/vrml
vrml x-world/x-vrml
vsd application/x-visio
vst application/x-visio
vsw application/x-visio
wav audio/wav
wav audio/x-wav
wmf windows/metafile
xla application/excel
xla application/x-excel
xla application/x-msexcel
xlb application/excel
xlb application/vnd.ms-excel
xlb application/x-excel
xlc application/excel
xlc application/vnd.ms-excel
xlc application/x-excel
xld application/excel
xld application/x-excel
xlk application/excel
xlk application/x-excel
xll application/excel
xll application/vnd.ms-excel
xll application/x-excel
xlm application/excel
xlm application/vnd.ms-excel
xlm application/x-excel
xls application/excel
xls application/vnd.ms-excel
xls application/x-excel
xls application/x-msexcel
xlt application/excel
xlt application/x-excel
xlv application/excel
xlv application/x-excel
xlw application/excel
xlw application/vnd.ms-excel
xlw application/x-excel
xlw application/x-msexcel
xm audio/xm
xml application/xml
xml text/xml
z application/x-compress
z application/x-compressed
zip application/x-compressed
zip application/x-zip-compressed
zip application/zip
zip multipart/x-zip
Читайте также:  Python certificate verify failed ssl error

Статьи по теме

Не выкладывайте свой код напрямую в комментариях, он отображается некорректно. Воспользуйтесь сервисом cssdeck.com или jsfiddle.net, сохраните код и в комментариях дайте на него ссылку. Так и результат сразу увидят.

Типы тегов

HTML5

Блочные элементы

Строчные элементы

Универсальные элементы

Нестандартные теги

Осуждаемые теги

Видео

Документ

Звук

Изображения

Объекты

Скрипты

Списки

Ссылки

Таблицы

Текст

Форматирование

Формы

Фреймы

Источник

Оцените статью