Common MIME types

Servers and upload forms rely on these strings; a wrong type can break previews, downloads, or your Content Security Policy.

Updated:

KindMIME typeTypical ext
HTMLtext/html.html
CSStext/css.css
JavaScripttext/javascript.js
JSONapplication/json.json
XMLapplication/xml.xml
Plain texttext/plain.txt
CSVtext/csv.csv
PDFapplication/pdf.pdf
ZIPapplication/zip.zip
PNGimage/png.png
JPEGimage/jpeg.jpg
GIFimage/gif.gif
WebPimage/webp.webp
SVGimage/svg+xml.svg
ICOimage/x-icon.ico
MP3audio/mpeg.mp3
WAVaudio/wav.wav
MP4video/mp4.mp4
WebMvideo/webm.webm
WOFF2font/woff2.woff2
Form URL-encodedapplication/x-www-form-urlencoded
Multipart formmultipart/form-data

Notes

Frequently asked questions

What MIME type should I use for a .json file?
Use application/json for JSON files and API responses. It is the standard type and should be served with charset UTF-8 where possible.
What is the MIME type for .js files?
The official type for JavaScript is text/javascript. The older application/javascript is obsolete and should no longer be used.
What MIME type does an SVG image use?
SVG files use image/svg+xml. Make sure you serve them as SVG, not as image/xml, or browsers will not render them inline.