All posts
MIME Types and Content-Type Headers: Complete Developer Reference
August 15, 2026 · DevTools
mime-types
http
networking
security
MIME Types and Content-Type Headers: Complete Developer Reference
MIME (Multipurpose Internet Mail Extensions) types tell web browsers and HTTP clients how to parse and render file streams.
Look up and detect file MIME types with the MIME Type Detector.
Common MIME Type Categories
- Text:
text/html,text/css,text/javascript,text/markdown - Application:
application/json,application/pdf,application/xml,application/zip - Image:
image/png,image/jpeg,image/webp,image/svg+xml,image/avif - Font:
font/woff2,font/woff,font/ttf
Security: Preventing MIME Sniffing
If a web server serves user-uploaded content with an incorrect MIME type, older browsers might "sniff" the content and execute malicious scripts. Protect your application with the HTTP security header:
X-Content-Type-Options: nosniff
Check extension mappings and media types with the MIME Type Detector.