Content types for HTTP, email & file handling
Referencetext/plain .txt
text/html .html .htm
text/css .css
text/javascript .js .mjs
text/csv .csv
text/xml .xml
text/markdown .md
text/calendar .ics
text/x-python .pyapplication/json .json
application/xml .xml
application/javascript .js
application/pdf .pdf
application/zip .zip
application/gzip .gz
application/x-tar .tar
application/octet-stream binary (download)
application/x-www-form-urlencoded form data
application/ld+json JSON-LD
application/graphql GraphQL
application/wasm .wasm
application/x-yaml .yaml .yml
application/toml .toml
application/sql .sql
application/msword .doc
application/vnd.openxmlformats-officedocument
.wordprocessingml.document .docx
application/vnd.ms-excel .xlsimage/jpeg .jpg .jpeg
image/png .png
image/gif .gif
image/webp .webp
image/svg+xml .svg
image/avif .avif
image/bmp .bmp
image/tiff .tiff
image/x-icon .ico
image/apng .apng# Audio
audio/mpeg .mp3
audio/ogg .ogg
audio/wav .wav
audio/webm .webm
audio/aac .aac
audio/flac .flac
audio/midi .midi
# Video
video/mp4 .mp4
video/webm .webm
video/ogg .ogv
video/quicktime .mov
video/x-msvideo .avi
video/x-matroska .mkvmultipart/form-data file upload
multipart/mixed email attachments
multipart/alternative email text+HTML
multipart/related compound docs
# Upload example (HTTP)
Content-Type: multipart/form-data; boundary=---abc
---abc
Content-Disposition: form-data; name="file"; filename="photo.jpg"
Content-Type: image/jpeg
(binary data)
---abc--font/woff .woff
font/woff2 .woff2
font/ttf .ttf
font/otf .otf
font/collection .ttc
# Usage in CSS
@font-face {
font-family: 'Custom';
src: url('font.woff2') format('woff2'),
url('font.woff') format('woff');
}# HTTP Headers
Content-Type: application/json
Content-Type: text/html; charset=utf-8
Content-Type: multipart/form-data
Accept: application/json, text/plain
# Express.js
res.type('json') // application/json
res.type('html') // text/html
# <link> / <script> tags
<link rel="stylesheet" type="text/css">
<script type="text/javascript">
<script type="module">