MIME 类型查询
开发
文件扩展名与 HTTP 服务器和 `Content-Type` 头使用的 MIME / 媒体类型实用参考。按 application、audio、font、image、text、video、multipart 分类筛选,或同时按扩展名、MIME 字符串、描述搜索。
—
| 扩展名 | MIME 类型 | 描述 | |
|---|---|---|---|
| .json | application/json | JSON data interchange format (RFC 8259). | |
| .xml | application/xml | XML data — use text/xml for human-readable, application/xml for machine-only. | |
| application/pdf | Portable Document Format. | ||
| .zip | application/zip | PKZIP archive. | |
| .gz | application/gzip | Gzip-compressed file. | |
| .tar | application/x-tar | Tape archive (Unix). | |
| .7z | application/x-7z-compressed | 7-Zip archive. | |
| .rar | application/vnd.rar | RAR archive. | |
| .js | application/javascript | JavaScript source — text/javascript is preferred in HTTP per the WHATWG. | |
| .wasm | application/wasm | WebAssembly binary module. | |
| .bin | application/octet-stream | Arbitrary binary data — the default for unknown types. | |
| .doc | application/msword | Microsoft Word 97-2003. | |
| .docx | application/vnd.openxmlformats-officedocument.wordprocessingml.document | Microsoft Word (Office Open XML). | |
| .xls | application/vnd.ms-excel | Microsoft Excel 97-2003. | |
| .xlsx | application/vnd.openxmlformats-officedocument.spreadsheetml.sheet | Microsoft Excel (Office Open XML). | |
| .ppt | application/vnd.ms-powerpoint | Microsoft PowerPoint 97-2003. | |
| .pptx | application/vnd.openxmlformats-officedocument.presentationml.presentation | Microsoft PowerPoint (Office Open XML). | |
| .odt | application/vnd.oasis.opendocument.text | OpenDocument Text (LibreOffice / OpenOffice). | |
| .mp3 | audio/mpeg | MPEG-1 Audio Layer 3. | |
| .wav | audio/wav | Waveform Audio File Format. | |
| .ogg | audio/ogg | Ogg container with Vorbis/Opus. | |
| .flac | audio/flac | Free Lossless Audio Codec. | |
| .aac | audio/aac | Advanced Audio Coding. | |
| .m4a | audio/mp4 | AAC inside an MP4 container. | |
| .webm | audio/webm | WebM audio (Vorbis/Opus). | |
| .ttf | font/ttf | TrueType font. | |
| .otf | font/otf | OpenType font. | |
| .woff | font/woff | Web Open Font Format. | |
| .woff2 | font/woff2 | Web Open Font Format 2 — better compression than woff. | |
| .jpg | image/jpeg | JPEG image — use this for `.jpg` and `.jpeg`. | |
| .png | image/png | Portable Network Graphics. | |
| .gif | image/gif | Graphics Interchange Format — supports animation. | |
| .webp | image/webp | WebP — smaller than JPEG/PNG, supports transparency and animation. | |
| .avif | image/avif | AV1 Image File Format — even smaller than WebP. | |
| .svg | image/svg+xml | Scalable Vector Graphics — XML-based vector format. | |
| .ico | image/vnd.microsoft.icon | Windows icon — also commonly served as image/x-icon. | |
| .bmp | image/bmp | Windows Bitmap. | |
| .tiff | image/tiff | Tagged Image File Format. | |
| .heic | image/heic | High Efficiency Image Format (iOS default). | |
| .txt | text/plain | Plain text — the default for unknown text. | |
| .html | text/html | HyperText Markup Language. | |
| .css | text/css | Cascading Style Sheets. | |
| .csv | text/csv | Comma-Separated Values. | |
| .tsv | text/tab-separated-values | Tab-Separated Values. | |
| .md | text/markdown | Markdown source. | |
| .yaml | application/yaml | YAML document — older text/x-yaml is still seen in the wild. | |
| .ics | text/calendar | iCalendar event/calendar data (RFC 5545). | |
| .vcf | text/vcard | vCard contact data. | |
| .mp4 | video/mp4 | MPEG-4 video (H.264/H.265 + AAC). | |
| .webm | video/webm | WebM video (VP8/VP9 + Vorbis/Opus). | |
| .mov | video/quicktime | QuickTime Movie. | |
| .avi | video/x-msvideo | Audio Video Interleave. | |
| .mkv | video/x-matroska | Matroska Multimedia Container. | |
| .mpeg | video/mpeg | MPEG-1/2 video. | |
| — | multipart/form-data | HTML form upload with files — used by <form enctype="…">. | |
| — | multipart/byteranges | Multiple ranges from a single resource — Range request responses. | |
| — | multipart/mixed | Several body parts of different content types. |
使用方法
- 在搜索框输入扩展名 (`.zip`)、MIME (`application/json`) 或关键字 (`compressed`)。
- 选择分类来缩小范围 — 例如配置上传时只看图像类型。
- 点击各行的复制按钮把 MIME 字符串复制到剪贴板。
常见问题
- JS 文件应该用 `text/javascript` 还是 `application/javascript`?
- 两者都能用,但 WHATWG HTML 规范官方推荐通过 HTTP 提供 JavaScript 时使用 `text/javascript`。`application/javascript` 也被广泛支持,旧配置中常见。
- `image/jpeg` 和 `image/jpg` 的区别?
- 只有 `image/jpeg` 是 IANA 注册的类型。`image/jpg` 是常见拼写错误 — 多数浏览器容忍,但工具和 HTTP 缓存可能拒绝。
- 什么时候用 `application/octet-stream`?
- 没有更具体类型的任意二进制数据,或想强制浏览器下载而非显示文件时。配合 `Content-Disposition: attachment` 头使用。