Web Development Reference
MIME Types Reference
A MIME type is the Content-Type label that tells a browser what a file actually is, independent of its extension — text/html, image/webp, application/json. Serving the wrong one makes browsers download files they should render, or refuse scripts and stylesheets outright. This reference maps each common extension to its correct type.
Browse by Category
Text
10Markup, stylesheets, scripts and plain text.
Images
12Raster and vector image formats.
Audio
9Compressed and uncompressed sound.
Video
9Containers and streaming manifests.
Documents
11Office formats, PDF and e-books.
Archives & Binaries
12Compressed bundles and executables.
Data & Application
17Structured interchange and API payloads.
Fonts
6Web and desktop font formats.
All MIME Types (86)
Text (10)
Markup, stylesheets, scripts and plain text.
| MIME type | Format | Description | Extensions |
|---|---|---|---|
text/html | HTML | Web pages. Always send it with charset=utf-8 so the browser does no guessing. | .html .htm |
text/css | CSS | Stylesheets. A stylesheet served as text/plain is silently ignored by the browser. | .css |
text/javascript | JavaScript | The standard type for scripts. application/javascript is the older spelling and works identically; ES modules use this same type. | .js .mjs |
text/plain | Plain text | Unformatted text. The safe fallback that renders in the browser rather than downloading. | .txt .log |
text/csv | CSV | Comma-separated values. Pair it with Content-Disposition: attachment to make a spreadsheet download. | .csv |
text/markdown | Markdown | Markdown source. Browsers display it as plain text — rendering is the application's job. | .md .markdown |
text/xml | XML (readable) | XML intended for humans to read. Use application/xml when it is only for machines. | .xml |
text/calendar | iCalendar | Calendar events. Mail clients offer to add it to a calendar on sight. | .ics |
text/vcard | vCard | Contact cards, the payload behind most contact QR codes. | .vcf |
text/event-stream | Server-sent events | The streaming type for EventSource. Requires no buffering anywhere in the proxy chain to work. | — |
Format
HTML
Description
Web pages. Always send it with charset=utf-8 so the browser does no guessing.
Extensions
.html .htm
Format
CSS
Description
Stylesheets. A stylesheet served as text/plain is silently ignored by the browser.
Extensions
.css
Format
JavaScript
Description
The standard type for scripts. application/javascript is the older spelling and works identically; ES modules use this same type.
Extensions
.js .mjs
Format
Plain text
Description
Unformatted text. The safe fallback that renders in the browser rather than downloading.
Extensions
.txt .log
Format
CSV
Description
Comma-separated values. Pair it with Content-Disposition: attachment to make a spreadsheet download.
Extensions
.csv
Format
Markdown
Description
Markdown source. Browsers display it as plain text — rendering is the application's job.
Extensions
.md .markdown
Format
XML (readable)
Description
XML intended for humans to read. Use application/xml when it is only for machines.
Extensions
.xml
Format
iCalendar
Description
Calendar events. Mail clients offer to add it to a calendar on sight.
Extensions
.ics
Format
vCard
Description
Contact cards, the payload behind most contact QR codes.
Extensions
.vcf
Format
Server-sent events
Description
The streaming type for EventSource. Requires no buffering anywhere in the proxy chain to work.
Extensions
—
Images (12)
Raster and vector image formats.
| MIME type | Format | Description | Extensions |
|---|---|---|---|
image/jpeg | JPEG | Lossy photographic compression. No transparency, and repeated re-saving degrades quality. | .jpg .jpeg |
image/png | PNG | Lossless with alpha transparency. The right choice for screenshots, logos and line art. | .png |
image/gif | GIF | 256 colours and simple animation. Superseded by WebP and AVIF for anything but nostalgia. | .gif |
image/webp | WebP | Lossy and lossless in one format with transparency and animation. Roughly 30% smaller than JPEG at the same quality. | .webp |
image/avif | AVIF | AV1-based still images — smaller again than WebP, with HDR and wide gamut. Slower to encode. | .avif |
image/svg+xml | SVG | Vector graphics as XML. It can contain script, so sanitise any SVG a user uploads before serving it. | .svg |
image/x-icon | Favicon | The type browsers actually honour for favicons, despite image/vnd.microsoft.icon being the registered name. | .ico |
image/bmp | Bitmap | Uncompressed raster images. Huge files, essentially never right for the web. | .bmp |
image/tiff | TIFF | High-fidelity images for print and scanning. Not displayable in browsers. | .tif .tiff |
image/heic | HEIC | The default camera format on iPhones. Browser support is limited, so uploads usually need converting. | .heic .heif |
image/apng | Animated PNG | Animation with full alpha and 24-bit colour, unlike GIF. | .apng |
image/jxl | JPEG XL | A newer codec with lossless JPEG recompression. Browser support remains partial. | .jxl |
Format
JPEG
Description
Lossy photographic compression. No transparency, and repeated re-saving degrades quality.
Extensions
.jpg .jpeg
Format
PNG
Description
Lossless with alpha transparency. The right choice for screenshots, logos and line art.
Extensions
.png
Format
GIF
Description
256 colours and simple animation. Superseded by WebP and AVIF for anything but nostalgia.
Extensions
.gif
Format
WebP
Description
Lossy and lossless in one format with transparency and animation. Roughly 30% smaller than JPEG at the same quality.
Extensions
.webp
Format
AVIF
Description
AV1-based still images — smaller again than WebP, with HDR and wide gamut. Slower to encode.
Extensions
.avif
Format
SVG
Description
Vector graphics as XML. It can contain script, so sanitise any SVG a user uploads before serving it.
Extensions
.svg
Format
Favicon
Description
The type browsers actually honour for favicons, despite image/vnd.microsoft.icon being the registered name.
Extensions
.ico
Format
Bitmap
Description
Uncompressed raster images. Huge files, essentially never right for the web.
Extensions
.bmp
Format
TIFF
Description
High-fidelity images for print and scanning. Not displayable in browsers.
Extensions
.tif .tiff
Format
HEIC
Description
The default camera format on iPhones. Browser support is limited, so uploads usually need converting.
Extensions
.heic .heif
Format
Animated PNG
Description
Animation with full alpha and 24-bit colour, unlike GIF.
Extensions
.apng
Format
JPEG XL
Description
A newer codec with lossless JPEG recompression. Browser support remains partial.
Extensions
.jxl
Audio (9)
Compressed and uncompressed sound.
| MIME type | Format | Description | Extensions |
|---|---|---|---|
audio/mpeg | MP3 | The near-universal lossy audio format. Note the type is audio/mpeg, not audio/mp3. | .mp3 |
audio/wav | WAV | Uncompressed PCM audio. Large, lossless, and the usual intermediate in audio processing. | .wav |
audio/ogg | Ogg Vorbis | Open, royalty-free lossy audio in an Ogg container. | .ogg .oga |
audio/webm | WebM audio | Opus or Vorbis in a WebM container — what MediaRecorder produces in Chrome by default. | .weba |
audio/aac | AAC | The successor to MP3, better at equal bitrate. Standard in the Apple ecosystem. | .aac |
audio/mp4 | M4A | AAC audio in an MP4 container, the format iTunes and Apple Music use. | .m4a |
audio/flac | FLAC | Lossless compression at roughly half the size of WAV. | .flac |
audio/opus | Opus | Excellent at both speech and music bitrates. The codec WebRTC uses for voice. | .opus |
audio/midi | MIDI | Note instructions rather than recorded sound, so files are tiny. | .mid .midi |
Format
MP3
Description
The near-universal lossy audio format. Note the type is audio/mpeg, not audio/mp3.
Extensions
.mp3
Format
WAV
Description
Uncompressed PCM audio. Large, lossless, and the usual intermediate in audio processing.
Extensions
.wav
Format
Ogg Vorbis
Description
Open, royalty-free lossy audio in an Ogg container.
Extensions
.ogg .oga
Format
WebM audio
Description
Opus or Vorbis in a WebM container — what MediaRecorder produces in Chrome by default.
Extensions
.weba
Format
AAC
Description
The successor to MP3, better at equal bitrate. Standard in the Apple ecosystem.
Extensions
.aac
Format
M4A
Description
AAC audio in an MP4 container, the format iTunes and Apple Music use.
Extensions
.m4a
Format
FLAC
Description
Lossless compression at roughly half the size of WAV.
Extensions
.flac
Format
Opus
Description
Excellent at both speech and music bitrates. The codec WebRTC uses for voice.
Extensions
.opus
Format
MIDI
Description
Note instructions rather than recorded sound, so files are tiny.
Extensions
.mid .midi
Video (9)
Containers and streaming manifests.
| MIME type | Format | Description | Extensions |
|---|---|---|---|
video/mp4 | MP4 | H.264 in an MP4 container — the most broadly compatible web video. Put the moov atom first so it streams before fully downloading. | .mp4 .m4v |
video/webm | WebM | VP8, VP9 or AV1 in an open container. Smaller than MP4, with no Safari guarantee on older devices. | .webm |
video/ogg | Ogg Theora | An early open video format, now largely historical. | .ogv |
video/quicktime | QuickTime | Apple's MOV container. Often needs remuxing to MP4 for the web. | .mov |
video/x-msvideo | AVI | A legacy Microsoft container. Not playable natively in browsers. | .avi |
video/x-matroska | Matroska | A flexible container carrying many tracks and subtitles. Common for downloads, not for browsers. | .mkv |
application/vnd.apple.mpegurl | HLS playlist | The manifest for HTTP Live Streaming, listing the segments a player fetches in turn. | .m3u8 |
application/dash+xml | DASH manifest | The MPEG-DASH equivalent of an HLS playlist for adaptive streaming. | .mpd |
video/mp2t | MPEG-TS | Transport stream segments, the pieces an HLS playlist points at. | .ts |
Format
MP4
Description
H.264 in an MP4 container — the most broadly compatible web video. Put the moov atom first so it streams before fully downloading.
Extensions
.mp4 .m4v
Format
WebM
Description
VP8, VP9 or AV1 in an open container. Smaller than MP4, with no Safari guarantee on older devices.
Extensions
.webm
Format
Ogg Theora
Description
An early open video format, now largely historical.
Extensions
.ogv
Format
QuickTime
Description
Apple's MOV container. Often needs remuxing to MP4 for the web.
Extensions
.mov
Format
AVI
Description
A legacy Microsoft container. Not playable natively in browsers.
Extensions
.avi
Format
Matroska
Description
A flexible container carrying many tracks and subtitles. Common for downloads, not for browsers.
Extensions
.mkv
Format
HLS playlist
Description
The manifest for HTTP Live Streaming, listing the segments a player fetches in turn.
Extensions
.m3u8
Format
DASH manifest
Description
The MPEG-DASH equivalent of an HLS playlist for adaptive streaming.
Extensions
.mpd
Format
MPEG-TS
Description
Transport stream segments, the pieces an HLS playlist points at.
Extensions
.ts
Documents (11)
Office formats, PDF and e-books.
| MIME type | Format | Description | Extensions |
|---|---|---|---|
application/pdf | Fixed-layout documents. Browsers render it inline unless Content-Disposition says otherwise. | ||
application/msword | Word (legacy) | The pre-2007 binary .doc format. | .doc |
application/vnd.openxmlformats-officedocument.wordprocessingml.document | Word (DOCX) | The modern Word format — a zip of XML parts, which is why the type is so long. | .docx |
application/vnd.ms-excel | Excel (legacy) | The pre-2007 binary .xls format. | .xls |
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet | Excel (XLSX) | The modern Excel workbook format. | .xlsx |
application/vnd.ms-powerpoint | PowerPoint (legacy) | The pre-2007 binary .ppt format. | .ppt |
application/vnd.openxmlformats-officedocument.presentationml.presentation | PowerPoint (PPTX) | The modern PowerPoint deck format. | .pptx |
application/vnd.oasis.opendocument.text | OpenDocument text | The LibreOffice and OpenOffice document format. | .odt |
application/vnd.oasis.opendocument.spreadsheet | OpenDocument sheet | The LibreOffice spreadsheet format. | .ods |
application/rtf | Rich Text | A portable formatted-text format readable by essentially every word processor. | .rtf |
application/epub+zip | EPUB | The open e-book standard — reflowable HTML in a zip. | .epub |
Format
Description
Fixed-layout documents. Browsers render it inline unless Content-Disposition says otherwise.
Extensions
Format
Word (legacy)
Description
The pre-2007 binary .doc format.
Extensions
.doc
Format
Word (DOCX)
Description
The modern Word format — a zip of XML parts, which is why the type is so long.
Extensions
.docx
Format
Excel (legacy)
Description
The pre-2007 binary .xls format.
Extensions
.xls
Format
Excel (XLSX)
Description
The modern Excel workbook format.
Extensions
.xlsx
Format
PowerPoint (legacy)
Description
The pre-2007 binary .ppt format.
Extensions
.ppt
Format
PowerPoint (PPTX)
Description
The modern PowerPoint deck format.
Extensions
.pptx
Format
OpenDocument text
Description
The LibreOffice and OpenOffice document format.
Extensions
.odt
Format
OpenDocument sheet
Description
The LibreOffice spreadsheet format.
Extensions
.ods
Format
Rich Text
Description
A portable formatted-text format readable by essentially every word processor.
Extensions
.rtf
Format
EPUB
Description
The open e-book standard — reflowable HTML in a zip.
Extensions
.epub
Archives & Binaries (12)
Compressed bundles and executables.
| MIME type | Format | Description | Extensions |
|---|---|---|---|
application/zip | ZIP | The most widely supported archive format, readable without extra software on every desktop platform. | .zip |
application/gzip | Gzip | Single-file compression. A .tar.gz is a tar archive that has then been gzipped. | .gz |
application/x-tar | Tar | An uncompressed bundle of files preserving Unix permissions. | .tar |
application/x-7z-compressed | 7-Zip | Higher compression than zip, at the cost of needing 7-Zip to open. | .7z |
application/vnd.rar | RAR | A proprietary archive format needing third-party software to extract. | .rar |
application/x-bzip2 | Bzip2 | Better compression than gzip and noticeably slower. | .bz2 |
application/zstd | Zstandard | Near-gzip ratios at far higher speed. Increasingly the default in package managers. | .zst |
application/octet-stream | Arbitrary binary | The generic "unknown binary" fallback. Browsers download it rather than rendering, which is useful deliberately and a bug by accident. | .bin .exe |
application/wasm | WebAssembly | Required for streaming compilation — WebAssembly.instantiateStreaming refuses any other type. | .wasm |
application/java-archive | JAR | A Java archive, structurally a zip with a manifest. | .jar |
application/vnd.android.package-archive | Android APK | An Android application package. | .apk |
application/x-apple-diskimage | macOS disk image | The DMG format macOS applications are distributed in. | .dmg |
Format
ZIP
Description
The most widely supported archive format, readable without extra software on every desktop platform.
Extensions
.zip
Format
Gzip
Description
Single-file compression. A .tar.gz is a tar archive that has then been gzipped.
Extensions
.gz
Format
Tar
Description
An uncompressed bundle of files preserving Unix permissions.
Extensions
.tar
Format
7-Zip
Description
Higher compression than zip, at the cost of needing 7-Zip to open.
Extensions
.7z
Format
RAR
Description
A proprietary archive format needing third-party software to extract.
Extensions
.rar
Format
Bzip2
Description
Better compression than gzip and noticeably slower.
Extensions
.bz2
Format
Zstandard
Description
Near-gzip ratios at far higher speed. Increasingly the default in package managers.
Extensions
.zst
Format
Arbitrary binary
Description
The generic "unknown binary" fallback. Browsers download it rather than rendering, which is useful deliberately and a bug by accident.
Extensions
.bin .exe
Format
WebAssembly
Description
Required for streaming compilation — WebAssembly.instantiateStreaming refuses any other type.
Extensions
.wasm
Format
JAR
Description
A Java archive, structurally a zip with a manifest.
Extensions
.jar
Format
Android APK
Description
An Android application package.
Extensions
.apk
Format
macOS disk image
Description
The DMG format macOS applications are distributed in.
Extensions
.dmg
Data & Application (17)
Structured interchange and API payloads.
| MIME type | Format | Description | Extensions |
|---|---|---|---|
application/json | JSON | The default for REST APIs. Defined as always UTF-8, so a charset parameter is redundant. | .json |
application/ld+json | JSON-LD | Linked data — the format search engines read structured data in, including this site's schema markup. | .jsonld |
application/xml | XML | XML for machine consumption. Use text/xml when a human is expected to read it. | .xml |
application/rss+xml | RSS feed | A syndication feed for blogs and podcasts. | .rss .xml |
application/atom+xml | Atom feed | The stricter, better-specified alternative to RSS. | .atom |
application/x-www-form-urlencoded | Form (encoded) | The default encoding for an HTML form post — key=value pairs joined by ampersands. Cannot carry files. | — |
multipart/form-data | Form (multipart) | The encoding required for file uploads, splitting each field into its own part with a boundary marker. | — |
application/graphql | GraphQL | A raw GraphQL query body. Most clients post application/json with a query field instead. | .graphql .gql |
application/grpc | gRPC | gRPC over HTTP/2. Requires end-to-end HTTP/2, which is why some proxies break it. | — |
application/x-ndjson | NDJSON | One JSON object per line, so a huge dataset can be streamed and parsed incrementally. | .ndjson .jsonl |
application/yaml | YAML | Configuration and manifests. Registered only recently; text/yaml is still seen in the wild. | .yaml .yml |
application/toml | TOML | A configuration format designed to be unambiguous, used by Cargo and pyproject. | .toml |
application/sql | SQL | SQL scripts and database dumps. | .sql |
application/manifest+json | Web app manifest | The PWA manifest describing name, icons and display mode for an installable web app. | .webmanifest |
application/pgp-signature | PGP signature | A detached signature verifying that a file has not been altered. | .asc .sig |
application/x-pkcs12 | PKCS#12 bundle | A certificate and its private key in one password-protected file. | .p12 .pfx |
application/x-x509-ca-cert | X.509 certificate | A DER or PEM encoded certificate. | .crt .cer .pem |
Format
JSON
Description
The default for REST APIs. Defined as always UTF-8, so a charset parameter is redundant.
Extensions
.json
Format
JSON-LD
Description
Linked data — the format search engines read structured data in, including this site's schema markup.
Extensions
.jsonld
Format
XML
Description
XML for machine consumption. Use text/xml when a human is expected to read it.
Extensions
.xml
Format
RSS feed
Description
A syndication feed for blogs and podcasts.
Extensions
.rss .xml
Format
Atom feed
Description
The stricter, better-specified alternative to RSS.
Extensions
.atom
Format
Form (encoded)
Description
The default encoding for an HTML form post — key=value pairs joined by ampersands. Cannot carry files.
Extensions
—
Format
Form (multipart)
Description
The encoding required for file uploads, splitting each field into its own part with a boundary marker.
Extensions
—
Format
GraphQL
Description
A raw GraphQL query body. Most clients post application/json with a query field instead.
Extensions
.graphql .gql
Format
gRPC
Description
gRPC over HTTP/2. Requires end-to-end HTTP/2, which is why some proxies break it.
Extensions
—
Format
NDJSON
Description
One JSON object per line, so a huge dataset can be streamed and parsed incrementally.
Extensions
.ndjson .jsonl
Format
YAML
Description
Configuration and manifests. Registered only recently; text/yaml is still seen in the wild.
Extensions
.yaml .yml
Format
TOML
Description
A configuration format designed to be unambiguous, used by Cargo and pyproject.
Extensions
.toml
Format
SQL
Description
SQL scripts and database dumps.
Extensions
.sql
Format
Web app manifest
Description
The PWA manifest describing name, icons and display mode for an installable web app.
Extensions
.webmanifest
Format
PGP signature
Description
A detached signature verifying that a file has not been altered.
Extensions
.asc .sig
Format
PKCS#12 bundle
Description
A certificate and its private key in one password-protected file.
Extensions
.p12 .pfx
Format
X.509 certificate
Description
A DER or PEM encoded certificate.
Extensions
.crt .cer .pem
Fonts (6)
Web and desktop font formats.
| MIME type | Format | Description | Extensions |
|---|---|---|---|
font/woff2 | WOFF2 | The web font format to ship. Brotli-compressed, roughly 30% smaller than WOFF, and supported everywhere that matters. | .woff2 |
font/woff | WOFF | The older web font format, worth serving only as a fallback for genuinely ancient browsers. | .woff |
font/ttf | TrueType | A desktop font format. Usable on the web but unnecessarily large next to WOFF2. | .ttf |
font/otf | OpenType | TrueType with extra typographic features. Again, convert to WOFF2 before serving. | .otf |
font/collection | Font collection | Several fonts sharing one file, typically a family shipped together. | .ttc |
application/vnd.ms-fontobject | EOT | Embedded OpenType, needed only by Internet Explorer 8 and earlier. | .eot |
Format
WOFF2
Description
The web font format to ship. Brotli-compressed, roughly 30% smaller than WOFF, and supported everywhere that matters.
Extensions
.woff2
Format
WOFF
Description
The older web font format, worth serving only as a fallback for genuinely ancient browsers.
Extensions
.woff
Format
TrueType
Description
A desktop font format. Usable on the web but unnecessarily large next to WOFF2.
Extensions
.ttf
Format
OpenType
Description
TrueType with extra typographic features. Again, convert to WOFF2 before serving.
Extensions
.otf
Format
Font collection
Description
Several fonts sharing one file, typically a family shipped together.
Extensions
.ttc
Format
EOT
Description
Embedded OpenType, needed only by Internet Explorer 8 and earlier.
Extensions
.eot
Frequently Asked Questions
What happens if I serve the wrong MIME type?
Browsers refuse to run resources whose type does not match their role — a stylesheet sent as text/plain is ignored, and a script sent as text/html is blocked. Files sent as application/octet-stream download instead of rendering. With X-Content-Type-Options: nosniff set, the browser will not guess and the failure is hard.
What is the correct MIME type for JavaScript?
text/javascript. It was long written as application/javascript, but the HTML specification now defines text/javascript as the standard and browsers treat both identically. ES modules use the same type; what makes them modules is type="module" on the tag, not the MIME type.
What is application/octet-stream?
The generic "arbitrary binary data" type — the fallback when a server does not know what a file is. Browsers download it rather than trying to render it, which makes it useful deliberately for forcing a download, and a bug when a real type exists.
Do I need charset on a Content-Type?
For text formats, yes — Content-Type: text/html; charset=utf-8 removes any guessing about encoding. It is unnecessary for binary types, and application/json is defined as always UTF-8, so a charset parameter on it is redundant.