Common List Of Mime Types

Below is a list of mime types I come across most often. Suggest others mime-types that should be a part of the list by leaving a comment below. You can also view my other article on finding the mime-type of a file to see how you can return the mime-type of a file determined by the file extension.

List Of Mime Types

Text

PHP – text/html
HTML – text/html
HTM – text/html
CSS – text/css

Multipart

– multipart/mixed

Application

PDF – application/pdf
ZIP – application/zip
JAVASCRIPT – application/javascript
JSON – application/json

Image

GIF – image/gif
JPEG – image/jpg
JPG – image/jpg
PNG – image/png

Video

MPEG-1 – video/mpeg
MP4 Video – video/mp4
Quicktime – video/quicktime
WMV – video/x-ms-wmv
3GP – video/3gpp

Audio

MP3 – audio/mpeg
MP4 – audio/mp4
Ogg Vorbis – audio/ogg

If you see anything missing from my list of mime types, please message me or leave a comment.

Conclusion

Browsers will detect the mime-type of files and display them accordingly. And because of this, it is important to have the correct Content-Type header set for your files. For example, if you read a jpeg from disk and echo the contents to the page, you must set the content type to image/jpeg or image/png in order for the browser to display it as an image and not just display the contents of the file.