By ToolzHive · Updated
Content-Type describes a representation. A filename extension is a convention, not proof of content or safety.
Reference table
| Extension | Media type | Typical use |
|---|---|---|
| .html | text/html | HTML |
| .css | text/css | Stylesheet |
| .js / .mjs | text/javascript | JavaScript |
| .json | application/json | JSON |
| .txt | text/plain | Plain text |
| .csv | text/csv | CSV |
| .xml | application/xml | XML |
| application/pdf | ||
| .jpg | image/jpeg | JPEG |
| .png | image/png | PNG |
| .webp | image/webp | WebP |
| .avif | image/avif | AVIF |
| .svg | image/svg+xml | SVG |
| .gif | image/gif | GIF |
| .woff2 | font/woff2 | Webfont |
| .zip | application/zip | ZIP archive |
| .bin | application/octet-stream | Generic binary |
Response example
Use Content-Type: application/json for a JSON API. HTML with UTF-8 can use text/html; charset=utf-8. Compression is described separately by Content-Encoding.
Uploads
Validate actual file content, size and allowed types on the server. Do not trust the supplied MIME label alone.
Try the related tools
- HTTP Headers Checker — View the HTTP response headers and status code of any URL, with a security header review.