Common MIME types
| Extension | MIME type | Typical use |
|---|---|---|
| .html | text/html | HTML documents |
| .css | text/css | Stylesheets |
| .js | text/javascript | JavaScript files |
| .json | application/json | API payloads and data files |
| application/pdf | PDF documents | |
| .csv | text/csv | Spreadsheet-style exports |
Image MIME types
PNG
image/png for lossless images and transparency.
JPEG
image/jpeg for photos and broad compatibility.
WebP
image/webp for modern compressed web delivery.
SVG
image/svg+xml for vector icons and logos.
Common pitfalls
- Do not guess MIME types from filenames alone if the upload pipeline can rename files.
- Using the wrong header can break previews, downloads, or inline rendering.
- application/octet-stream is a generic fallback, but it is less helpful than the real type.
Use this reference with the right tool
Related tools