AZ Tools

MIME 类型查询

开发

文件扩展名与 HTTP 服务器和 `Content-Type` 头使用的 MIME / 媒体类型实用参考。按 application、audio、font、image、text、video、multipart 分类筛选,或同时按扩展名、MIME 字符串、描述搜索。

扩展名MIME 类型描述
.jsonapplication/jsonJSON data interchange format (RFC 8259).
.xmlapplication/xmlXML data — use text/xml for human-readable, application/xml for machine-only.
.pdfapplication/pdfPortable Document Format.
.zipapplication/zipPKZIP archive.
.gzapplication/gzipGzip-compressed file.
.tarapplication/x-tarTape archive (Unix).
.7zapplication/x-7z-compressed7-Zip archive.
.rarapplication/vnd.rarRAR archive.
.jsapplication/javascriptJavaScript source — text/javascript is preferred in HTTP per the WHATWG.
.wasmapplication/wasmWebAssembly binary module.
.binapplication/octet-streamArbitrary binary data — the default for unknown types.
.docapplication/mswordMicrosoft Word 97-2003.
.docxapplication/vnd.openxmlformats-officedocument.wordprocessingml.documentMicrosoft Word (Office Open XML).
.xlsapplication/vnd.ms-excelMicrosoft Excel 97-2003.
.xlsxapplication/vnd.openxmlformats-officedocument.spreadsheetml.sheetMicrosoft Excel (Office Open XML).
.pptapplication/vnd.ms-powerpointMicrosoft PowerPoint 97-2003.
.pptxapplication/vnd.openxmlformats-officedocument.presentationml.presentationMicrosoft PowerPoint (Office Open XML).
.odtapplication/vnd.oasis.opendocument.textOpenDocument Text (LibreOffice / OpenOffice).
.mp3audio/mpegMPEG-1 Audio Layer 3.
.wavaudio/wavWaveform Audio File Format.
.oggaudio/oggOgg container with Vorbis/Opus.
.flacaudio/flacFree Lossless Audio Codec.
.aacaudio/aacAdvanced Audio Coding.
.m4aaudio/mp4AAC inside an MP4 container.
.webmaudio/webmWebM audio (Vorbis/Opus).
.ttffont/ttfTrueType font.
.otffont/otfOpenType font.
.wofffont/woffWeb Open Font Format.
.woff2font/woff2Web Open Font Format 2 — better compression than woff.
.jpgimage/jpegJPEG image — use this for `.jpg` and `.jpeg`.
.pngimage/pngPortable Network Graphics.
.gifimage/gifGraphics Interchange Format — supports animation.
.webpimage/webpWebP — smaller than JPEG/PNG, supports transparency and animation.
.avifimage/avifAV1 Image File Format — even smaller than WebP.
.svgimage/svg+xmlScalable Vector Graphics — XML-based vector format.
.icoimage/vnd.microsoft.iconWindows icon — also commonly served as image/x-icon.
.bmpimage/bmpWindows Bitmap.
.tiffimage/tiffTagged Image File Format.
.heicimage/heicHigh Efficiency Image Format (iOS default).
.txttext/plainPlain text — the default for unknown text.
.htmltext/htmlHyperText Markup Language.
.csstext/cssCascading Style Sheets.
.csvtext/csvComma-Separated Values.
.tsvtext/tab-separated-valuesTab-Separated Values.
.mdtext/markdownMarkdown source.
.yamlapplication/yamlYAML document — older text/x-yaml is still seen in the wild.
.icstext/calendariCalendar event/calendar data (RFC 5545).
.vcftext/vcardvCard contact data.
.mp4video/mp4MPEG-4 video (H.264/H.265 + AAC).
.webmvideo/webmWebM video (VP8/VP9 + Vorbis/Opus).
.movvideo/quicktimeQuickTime Movie.
.avivideo/x-msvideoAudio Video Interleave.
.mkvvideo/x-matroskaMatroska Multimedia Container.
.mpegvideo/mpegMPEG-1/2 video.
multipart/form-dataHTML form upload with files — used by <form enctype="…">.
multipart/byterangesMultiple ranges from a single resource — Range request responses.
multipart/mixedSeveral body parts of different content types.

使用方法

  1. 在搜索框输入扩展名 (`.zip`)、MIME (`application/json`) 或关键字 (`compressed`)。
  2. 选择分类来缩小范围 — 例如配置上传时只看图像类型。
  3. 点击各行的复制按钮把 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` 头使用。

相关工具