MIME types
Convert MIME types to file extensions and vice-versa.
About MIME types
Looks up the file extensions that belong to a MIME type, and the MIME type that belongs to a file extension, using the same database as most web servers and Node.js (the mime-db project).
When you would use it
- Finding the correct Content-Type header to send for a file your server delivers.
- Checking which extension to give a file received with a given MIME type.
- Configuring upload filters or accept attributes that must list MIME types.
How to use it
- In the first list, pick or type a MIME type such as application/pdf to see its extensions.
- In the second list, pick or type an extension such as png to see its MIME type(s).
- Both lists are searchable: start typing to filter them.
Things worth knowing
- Some types have several extensions (image/jpeg has jpeg, jpg, jpe, jfif) and some extensions have more than one registered type. The first entry is usually the preferred one.
- application/octet-stream is the fallback for unknown binary data; browsers download such files rather than displaying them.
- The MIME type is what the server declares, not what the file contains. A mismatch between the two can make browsers refuse to run scripts or styles.
- Text types usually need a charset, for example text/html; charset=utf-8. The list shows the type only.
Frequently asked questions
- Why is the extension I am looking for missing?
- The database only lists registered or widely used types. Very new or proprietary formats may be absent; use application/octet-stream or the vendor's documented type.
- What is the difference between text/javascript and application/javascript?
- Both have been used; the current standard is text/javascript. Browsers accept either for script files.