Liste des types communs
Ce sujet répertorie les types MIME les plus courants avec les types de documents correspondants, classés par leurs extensions courantes.
Les deux types MIME importants suivants sont les types par défaut :
text/plainest la valeur par défaut pour les fichiers texte. Un fichier texte doit être lisible par un humain et ne doit pas contenir de données binaires.application/octet-streamest la valeur par défaut pour tous les autres cas. Un type de fichier inconnu doit utiliser ce type. Lors de la navigation vers une ressource servie avec ce type, les navigateurs la téléchargent généralement au lieu de l'afficher comme une page, afin d'éviter l'exécution de scripts dans l'origine du site servant la ressource. Cependant, ces ressources peuvent encore être utilisées dans d'autres contextes, y compris être exécutées en tant que JavaScript lorsqu'elles sont référencées par un élément classique<script>— pour empêcher ce comportement, envoyezX-Content-Type-Options: nosniff.
L'IANA est le registre officiel des types de médias MIME et maintient une liste de tous les types MIME officiels (angl.). Ce tableau répertorie les types MIME importants pour le Web :
| Extension | Type de document | Type MIME |
|---|---|---|
.aac |
Fichier audio AAC | audio/aac |
.abw |
Document AbiWord (angl.) | application/x-abiword |
.apng |
Image Animated Portable Network Graphics (APNG) | image/apng |
.arc |
Document d'archive (plusieurs fichiers embarqués) | application/x-freearc |
.avif |
Image AVIF | image/avif |
.avi |
AVI : Audio Video Interleave | video/x-msvideo |
.azw |
Amazon Kindle eBook format | application/vnd.amazon.ebook |
.bin |
tout type de fichier binaire | application/octet-stream |
.bmp |
Windows OS/2 Bitmap Graphics | image/bmp |
.bz |
Archive BZip | application/x-bzip |
.bz2 |
Archive BZip2 | application/x-bzip2 |
.cda |
CD audio | application/x-cdf |
.csh |
Script C-Shell | application/x-csh |
.css |
Feuille de style en cascade (CSS) | text/css |
.csv |
Valeurs séparées par des virgules (CSV) | text/csv |
.doc |
Microsoft Word | application/msword |
.docx |
Microsoft Word (OpenXML) | application/vnd.openxmlformats-officedocument.wordprocessingml.document |
.eot |
Police MS OpenType embarquée | application/vnd.ms-fontobject |
.epub |
Publication électronique (EPUB) | application/epub+zip |
.gz |
Archive compressée GZip | application/gzip. Note, Windows et macOS téléversent les fichier .gz avec un type MIME non standard application/x-gzip. |
.gif |
Graphics Interchange Format (GIF) | image/gif |
.htm, .html |
HyperText Markup Language (HTML) | text/html |
.ico |
Format d'icône | image/vnd.microsoft.icon |
.ics |
Format iCalendar | text/calendar |
.jar |
Archive Java (JAR) | application/java-archive |
.jpeg, .jpg |
Images JPEG | image/jpeg |
.js |
JavaScript | text/javascript (Spécifications : HTML (angl.) et RFC 9239 (angl.)) |
.json |
Format JSON | application/json |
.jsonld |
Format JSON-LD | application/ld+json |
.md |
Markdown | text/markdown |
.mid, .midi |
Musical Instrument Digital Interface (MIDI) | audio/midi, audio/x-midi |
.mjs |
Module JavaScript | text/javascript |
.m4a |
Audio MP4 | audio/mp4 |
.mp3 |
Vidéo MP3 | audio/mpeg |
.mp4 |
Vidéo MP4 | video/mp4 |
.mpeg |
Vidéo MPEG | video/mpeg |
.mpkg |
Apple Installer Package | application/vnd.apple.installer+xml |
.odp |
Document de présentation OpenDocument | application/vnd.oasis.opendocument.presentation |
.ods |
Document de tableur OpenDocument | application/vnd.oasis.opendocument.spreadsheet |
.odt |
Document texte OpenDocument | application/vnd.oasis.opendocument.text |
.oga |
Audio Ogg | audio/ogg |
.ogv |
Vidéo Ogg | video/ogg |
.ogx |
Ogg | application/ogg |
.opus |
Audio Opus dans le conteneur Ogg | audio/ogg |
.otf |
Police OpenType | font/otf |
.png |
Portable Network Graphics | image/png |
.pdf |
Format de document portable (angl.) de Adobe (PDF) | application/pdf |
.php |
Hypertext Preprocessor (Page d'accueil personnel) | application/x-httpd-php |
.ppt |
Microsoft PowerPoint | application/vnd.ms-powerpoint |
.pptx |
Microsoft PowerPoint (OpenXML) | application/vnd.openxmlformats-officedocument.presentationml.presentation |
.rar |
Archive RAR | application/vnd.rar |
.rtf |
Format de texte riche (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 |
Flux de transport MPEG | video/mp2t |
.ttf |
Police TrueType | font/ttf |
.txt |
Texte, (généralement ASCII ou ISO 8859-n) | text/plain |
.vsd |
Microsoft Visio | application/vnd.visio |
.wasm |
Module binaire WebAssembly | application/wasm |
.wav |
Format Audio Waveform | audio/wav |
.weba |
Audio WEBM | audio/webm |
.webm |
Vidéo WEBM | video/webm |
.webmanifest |
Manifeste d'application web | application/manifest+json |
.webp |
Image WEBP | 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 est recommandé dans le RFC 7303 (angl.) (section 4.1), mais text/xml est parfois toujours utilisé. Vous pouvez assigner un type MIME spécifique à un fichier avec l'extension .xml en fonction de la manière dont son contenu est censé être interprété. Par exemple, un flux Atom est application/atom+xml, mais application/xml constitue une valeur par défaut valide. |
.xul |
XUL | application/vnd.mozilla.xul+xml |
.zip |
Archive ZIP | application/zip. Note, Windows téléverse des fichiers .zip avec le type MIME non standard application/x-zip-compressed. |
.3gp |
Conteneur audio/vidéo 3GPP (angl.) | video/3gpp ; audio/3gpp s'il ne contient pas de vidéo |
.3g2 |
Conteneur audio/vidéo 3GPP2 (angl.) | video/3gpp2 ; audio/3gpp2 s'il ne contient pas de vidéo |
.7z |
Archive 7-zip (angl.) | application/x-7z-compressed |
Voir aussi
- Détection du type MIME
- L'en-tête
X-Content-Type-Options - L'en-tête
Content-Type