The Content-Type header tells the browser how to treat a response, and getting it wrong is a recurring source of security bugs. A file served with the wrong type can be sniffed into something executable, and the right type is sometimes required for a feature to work at all. This tool maps any MIME type or file extension to its security profile so you can serve it safely.
How it works
The tool matches your input against a bundled registry, first as an exact MIME type, then as a file extension, then as a partial type name. For the matched entry it reports:
- Canonical Content-Type — the value to put in the header.
- Sniffability — whether browsers may MIME-sniff this type when
nosniffis absent. - Risk level — high for executable or scriptable types (HTML, JavaScript, SVG), lower for inert data and raster images.
- Recommended header —
X-Content-Type-Options: nosniff, which disables content sniffing across the board. - CSP directive — which Content-Security-Policy directive governs loading this type, for example
script-srcfor JavaScript andimg-srcfor images.
Example and tips
Look up .svg and the tool flags it high risk: SVG can embed <script>, so a hostile upload served inline runs in your origin. The guidance is to sanitise it or serve it with Content-Disposition: attachment. By contrast image/png is low risk, yet the tool still recommends nosniff so a mislabelled HTML payload cannot be sniffed into a document.
A safe default for almost every response is to set the correct Content-Type and always add X-Content-Type-Options: nosniff. Reserve inline rendering for types you fully control, and serve untrusted uploads as attachments.