Finding the Content-Type that matches an extension
When a download opens as text, a font refuses to load or an image breaks, a wrong Content-Type header is usually behind it. Type an extension or part of a type name and you get the matching types with their extensions and purpose, plus a ready-to-paste header line and a copy button.
The scope here is 66 types that are common on the web. The IANA media types registry holds thousands of entries, which cannot fit on one page, so anything missing has to be looked up in the registry itself. As of October 2026 the standard type for JavaScript is text/javascript, and application/javascript is obsolete.
Extensions and types are not one to one. One extension can be served as several types, and one type can own several extensions. This tool does not sniff file contents to detect a type; it matches on names only. Your server configuration has the final say, so check the response headers of a real request.
Frequently Asked Questions
The charset parameter is defined for text types, so add it to text/html or text/css. JSON is fixed to UTF-8 and defines no such parameter, and binary types such as images and fonts take none either.
Pick by purpose. An .xml file meant for machines goes out as application/xml, while one treated as readable text goes out as text/xml. The extension alone does not settle it.
Look it up in the IANA media types registry. This page keeps only the 66 types common on the web rather than a copy of the whole registry.