MIME Types Reference
Look up the Content-Type for a file extension, or the extension for a type: web, image, font, audio, video, archive, document and API media types.
Free · No sign-up · Your inputs stay in your browser
Reference
MIME types by file extension
| Extension | Content-Type | Notes |
|---|---|---|
| .html .htm | text/html | Add ; charset=utf-8. |
| .css | text/css | |
| .js .mjs | text/javascript | RFC 9239 made this the one standard type; application/javascript is obsolete. |
| .json .map | application/json | Always UTF-8 (RFC 8259); a charset parameter is meaningless. |
| .jsonld | application/ld+json | Structured data. |
| (none) | application/problem+json | Error responses (RFC 9457). |
| .ndjson | application/x-ndjson | Newline-delimited JSON. Not IANA-registered. |
| .xml | application/xml | text/xml is also accepted. |
| .txt | text/plain | |
| .csv | text/csv | RFC 4180. |
| .md | text/markdown | RFC 7763. |
| .yaml .yml | application/yaml | Registered in RFC 9512 (2024). |
| .toml | application/toml | |
| .ics | text/calendar | |
| .vcf | text/vcard | |
| (none) | text/event-stream | Server-sent events. |
| .svg | image/svg+xml | Can contain script. Serve user uploads with Content-Disposition: attachment or from another origin. |
| .png | image/png | |
| .jpg .jpeg | image/jpeg | |
| .gif | image/gif | |
| .webp | image/webp | |
| .avif | image/avif | |
| .ico | image/vnd.microsoft.icon | image/x-icon is common and works. |
| .bmp | image/bmp | |
| .tif .tiff | image/tiff | |
| .heic | image/heic | iPhone photos; most browsers cannot display it. |
| .woff2 | font/woff2 | |
| .woff | font/woff | |
| .ttf | font/ttf | |
| .otf | font/otf | |
| .mp4 | video/mp4 | |
| .webm | video/webm | |
| .mov | video/quicktime | |
| .mp3 | audio/mpeg | |
| .m4a | audio/mp4 | |
| .wav | audio/wav | |
| .ogg | audio/ogg | |
| .flac | audio/flac | |
| .aac | audio/aac | |
| application/pdf | ||
| .zip | application/zip | |
| .gz | application/gzip | Not to be confused with Content-Encoding: gzip. |
| .tar | application/x-tar | |
| .zst | application/zstd | |
| .bz2 | application/x-bzip2 | |
| .xz | application/x-xz | |
| .7z | application/x-7z-compressed | |
| .rar | application/vnd.rar | |
| .doc | application/msword | |
| .docx | application/vnd.openxmlformats-officedocument.wordprocessingml.document | |
| .xls | application/vnd.ms-excel | |
| .xlsx | application/vnd.openxmlformats-officedocument.spreadsheetml.sheet | |
| .pptx | application/vnd.openxmlformats-officedocument.presentationml.presentation | |
| .odt | application/vnd.oasis.opendocument.text | |
| .epub | application/epub+zip | |
| .rtf | application/rtf | |
| .wasm | application/wasm | Required for WebAssembly.instantiateStreaming. |
| .webmanifest | application/manifest+json | |
| .jar | application/java-archive | |
| .apk | application/vnd.android.package-archive | |
| .sh | application/x-sh | |
| .bin .exe (any binary) | application/octet-stream | The fallback: the browser downloads it instead of guessing. |
| (form) | application/x-www-form-urlencoded | Default HTML form encoding. |
| (form) | multipart/form-data | Forms with file uploads. Never set it by hand in fetch: the browser must add the boundary. |
Send X-Content-Type-Options: nosniff so browsers trust the Content-Type instead of guessing, and get the type right, because with nosniff a script or stylesheet served with the wrong type is refused. Types follow the IANA media type registry unless noted.
About this tool
Method, assumptions, practical next steps, and limits.
Why the type matters
Browsers decide what to do with a response from its Content-Type, not its file name. With X-Content-Type-Options: nosniff, which every site should send, a script served as text/plain is refused and a stylesheet with the wrong type is ignored. Types are registered in the IANA media types registry.
Recent changes
JavaScript's one type is text/javascript since RFC 9239 in 2022, and YAML got application/yaml in 2024. For uploads, check the file's content rather than trusting the type the browser sent, which comes from the file name; Laravel's mimes validation rule reads the content.